查看文件: chkpic.php
大小: 933 字节
类型: application/octet-stream
<? $authnum=rand(1000,9999); //while(($authnum=rand()%100000)<10000); Header("Content-type: image/PNG"); srand((double)microtime()*1000000); $im = imagecreate(62,20); $black = ImageColorAllocate($im, 0,0,0); $white = ImageColorAllocate($im, 255,255,255); $i[2] = ImageColorAllocate($im, 255,255,0); $i[3] = ImageColorAllocate($im, 255,0,0); $i[4] = ImageColorAllocate($im, 255,255,255); $gray = ImageColorAllocate($im, 200,200,200); imagefill($im,68,30,$gray); for ($c=0;$c<strlen($authnum);$c++){ $color=rand(2,4); $angle=rand(-10,10); $cx=5+$c*12; $word=substr($authnum,$c,1); ImageTTFText($im,14,$angle,$cx,18, $i[$color],"/www2/skybni/fonts/a.ttf",$word); } for($i=0;$i<100;$i++) { $randcolor = ImageColorallocate($im,rand(0,255),rand(0,255),rand(0,255)); imagesetpixel($im, rand()%70 , rand()%30 , $randcolor); } ImagePNG($im); ImageDestroy($im); ?>
保存
取消
返回文件列表