<?php
Header( "Content-type: image/PNG ");
$im = imagecreate(400,50);
$bkg = ImageColorAllocate($im, 128,64,225);
$clr = ImageColorAllocate($im, 255,255,255);
$fnt ="c:/winnt/fonts/simsun.ttc";//linux下改成linux下的字库路径
$str = iconv("GB2312","UTF-8","欢迎光临 ");
ImageTTFText($im, 20, 0, 230,40, $clr, $fnt, $str);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
imageline($im, 1, 1, 350, 25, $black);
imagearc($im, 200, 15, 20, 20, 35, 190, $white);
imagestring($im, 5, 4, 10,"Graph TEST!! ", $white);
ImagePNG($im);
ImageDestroy($im);
?>
Header( "Content-type: image/PNG ");
$im = imagecreate(400,50);
$bkg = ImageColorAllocate($im, 128,64,225);
$clr = ImageColorAllocate($im, 255,255,255);
$fnt ="c:/winnt/fonts/simsun.ttc";//linux下改成linux下的字库路径
$str = iconv("GB2312","UTF-8","欢迎光临 ");
ImageTTFText($im, 20, 0, 230,40, $clr, $fnt, $str);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
imageline($im, 1, 1, 350, 25, $black);
imagearc($im, 200, 15, 20, 20, 35, 190, $white);
imagestring($im, 5, 4, 10,"Graph TEST!! ", $white);
ImagePNG($im);
ImageDestroy($im);
?>