keywords + date
[forum_heracles.git] / ecriremail.php
1 <?php
2
3 include('config/conf.php');
4
5 if (isset($_REQUEST["ecrire"]))
6 $ecrire = $_REQUEST["ecrire"];
7 else $ecrire = "@";
8
9 $ecrire=str_rot13($ecrire);
10
11 $fontsize = 9 ;
12
13
14 $angle = 0 ;
15 $size = ImageTTFBBox( $fontsize, $angle, $font, $ecrire ) ;
16
17 $widthExtra = $size[2] * 0.025 ;
18 $width = round( $size[2] + $widthExtra ) ;
19 $widthExtra = round( $widthExtra ) ;
20
21 $heightExtra = ( abs( $size[5] ) + $size[3] ) * 0.15 ;
22 $height = abs( $size[5] ) + $size[3] + $heightExtra ;
23 $heightExtra = round( $heightExtra ) ;
24
25 $text_x = round( $widthExtra / 2 ) ;
26 $text_y = abs( $size[5] ) + round( $heightExtra / 2 ) ;
27
28 $im = imagecreate( $width+2, $height+2) ;
29 $bkgc = ImageColorAllocate( $im, 255, 255, 255 ) ;
30 $txtc = ImageColorAllocate( $im, 245, 75, 0 );
31 ImageTTFText( $im, $fontsize, $angle, $text_x, $text_y, $txtc, $font, $ecrire ) ;
32
33 Header( "Content-type: image/gif" ) ;
34 Imagejpeg( $im ) ;
35 ImageDestroy( $im ) ;
36
37 ?>