<?php
ob_clean();
$img=imagecreate(400,400);
$back=imagecolorallocate($img,200,200,100);
$blue=imagecolorallocate($img,100,0,200);
$red=imagecolorallocate($img,200,50,50);
$r1=imagecolorallocate($img,100,200,120);
imagesetpixel($img,200,200,$blue);
imageline($img,0,0,400,400,$blue);
imageline($img,0,400,400,00,$blue);
imagerectangle($img,100,100,300,300,$blue);
imageellipse($img,200,200,200,200,$blue);
imagearc($img,200,200,300,300,225,315,$blue);
imagefill($img,200,180,$red);
imagefill($img,200,220,$blue);
imagefilledrectangle($img,180,180,220,220,$r1);
// for($i=0;$i<50;$i++){
// $clr=imagecolorallocate($img,rand(0,200),rand(0,200),rand(0,200));
// $n=5*$i;
// imagerectangle($img,180-$n,180-$n,220+$n,220+$n,$blue);
// }
imagechar($img,5,195,195,"A",$red);
imagestring($img,5,150,320,"Hello World",$red);
// imagettftext($img,30,0,100,100,$red,"msyh.ttf","重庆");
header("Content-type:image/jpeg");
imagejpeg($img);
imagedestroy($img);