Code: Select all
function CreateHeader($text)
{
$image = imagecreatetruecolor(200, 21) or die("Could not create image.");
$text_color = imagecolorallocate($image, 60, 21, 0);
$bg_color = imagecolorallocate($image, 0, 0, 255);
$background = imagefilledrectangle($image, 0, 0, 200, 21, $bg_color);
imagecolortransparent($image, $bg_color);
imagettftext($image, 18, 0, 5, 18, $text_color, 'goudosb.ttf', $text);
imagegif($image);
imagedestroy($image);
}
header('Content-type: image/gif');
CreateHeader($_GET['text']);Try it out, the blue won't be transparent.