I use a out of house company for my server space. Now that I've learned about php I want to use the gif stream capabilities to create dynamic graphics for my pages. All of my attempts have failed. I think that my server may have php but not the GD lib. How would I find out? (I've asked the server people but they tend to be slow.) Is the GD lib free? would it be too much to ask them to run it?
This script returns a pare error on line 3
that's the first line with a GD lib command ...
<? Header("content-type: image/gif");
if(!isset($s)) $s=11
$size = imagettfbbox($s,0, "/fonts/TIMES.TTF",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9; $ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im,0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im,0,0,0);
$white = ImageColorAllocate($im,0x2c,0x6D,0xAF);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1, $black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad, $white);
ImageTTFText($im, $s, 0, (int)($xpad/2), $sy+(int)($ypad/2)-1, $white, "/fonts/TIMES.TTF", $text);
ImageGif($im);
ImageDestroy($im);
?>