Why is it when I use this a broken image pop's up ?
trying to create a png.
<?
Header("Content-type: image/png");
if(!isset($s)) $s=11;
if(!isset($fontface)) $fontface=( eregi('Unix',getenv('SERVER_SOFTWARE')) ) ? "arial.ttf" : "arial.ttf";
$fontsfolder=( eregi('Unix',getenv('SERVER_SOFTWARE')) ) ? "/fonts/" : '/winnt/fonts/'; # depends on system
if (!$text) $text="hi";
$size = imagettfbbox($s,0,$fontsfolder.$fontface,$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, 255,255,255);
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)+1, $dy+(int)($ypad/2), $black, $fontsfolder.$fontface, $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, $fontsfolder.$fontface, $text);
ImagePng($im);
ImageDestroy($im);
?>