keywords + date
[forum_heracles.git] / ecriremail.php
CommitLineData
dd62012c 1<?php
2
b28179d5 3include('config/conf.php');
4
dd62012c 5if (isset($_REQUEST["ecrire"]))
6 $ecrire = $_REQUEST["ecrire"];
7else $ecrire = "@";
8
9$ecrire=str_rot13($ecrire);
10
ac410eec 11$fontsize = 9 ;
dd62012c 12
b28179d5 13
dd62012c 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 ) ;
ac410eec 30$txtc = ImageColorAllocate( $im, 245, 75, 0 );
dd62012c 31ImageTTFText( $im, $fontsize, $angle, $text_x, $text_y, $txtc, $font, $ecrire ) ;
32
33Header( "Content-type: image/gif" ) ;
34Imagejpeg( $im ) ;
35ImageDestroy( $im ) ;
36
37?>