|
[ Autoren gesucht! ]
|
PHP-Homepage.de sucht laufend Autoren für News und Artikel
Interesse?
|
|
 |
|
[Start] [Suche] [Neue Einträge]
| Dynamischer Button | <?php
header("Content-type: image/gif");
$text = urldecode( implode($argv," "));
$fontfile = " adler.ttf";
$fontsize = 22;
$fontangle = 0;
$dimtxt = ImageTTFBBox( $fontsize, $fontangle, $fontfile, $text );
$border = 2;
$txtsizex = abs($dimtxt[4] - $dimtxt[0]);
$txtsizey = abs($dimtxt[5] - $dimtxt[1]);
$imgsizex = $txtsizex + 3*$border;
$imgsizey = $txtsizey + 5*$border;
$txtposx = $border;
$txtposy = $txtsizey + $border;
$img = imageCreate( $imgsizex, $imgsizey);
$col1 = imagecolorallocate( $img, 153, 0, 51);
$col2 = imagecolorallocate( $img, 255, 255, 255);
imagefill( $img, 0, 0, $col1);
imageTTFText( $img, $fontsize, $fontangle, $txtposx, $txtposy, $col2,
$fontfile, $text );
/* imagecolortransparent( $img, $col1); */
imagegif( $img );
imagedestroy( $img );
?>
|
|