php 그래프

출처 : http://missa.or.kr/cgi-bin/technote/read.cgi?board=com_php&y_number=31


<? header("content-type: image/png");
$im=imagecreate(250,250);
$white=ImageColorAllocate($im,255,255,255);
$blue=ImageColorAllocate($im,0,0,255);
$red=ImageColorallocate($im,255,0,0);
$green=ImageColorallocate($im,0,50,0);
$pink=ImageColorallocate($im,100,0,100);
imageline($im,0,125,250,125,$red);
imageline($im,125,0,125,250,$red);
for($n=1;$n < 220;$n+=20)
imagearc($im,125,125,$n,$n,0,360,$green);
imagestring($im, 2, 170, 233, "jjs7@dreamwiz.com", $blue);
$y0=125;
for($x=0;$x < 248;$x+=2)
{
$y1=round(125 - rand(10,30) );
imageline($im,$x,$y0,$x+2,$y1,$pink);
$y0=$y1;
}
imagepng($im);
imagedestroy($im); ?>

+ Recent posts