-
- $image=imagecreatetruecolor(100, 30);
- $white=imagecolorallocate($image, 255, 255, 2);
- $red=imagecolorallocate($image, 255, 0, 0) ;
- imagefill($image, 0, 0, $white);
- //munber create
- $num="";
- for($i=0;$i
- $num.= rand(1,9);
- }
- imagestring($image, 6, rand(10,20), rand(00,10), $num,imagecolorallocate($image, rand(0,100), rand(100,125), rand (0,255)) );
- for($j=0;$j
- imagesetpixel($image,rand(1,199), rand(1,29), imagecolorallocate($image, 255, 0 , 0));
- }
- for($k=0;$kimageline($image, rand(1,99), rand(1,29), rand(1,99) 、 rand(1,29)、imagecolorallocate($image,0,255, 0));
- }
- header("Content-type:image/png");
- imagepng($image);
- imagedestroy($image);
- ?>
复制代
|