亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP? ??? ?? ??? ???? ?? ??? ? ?? ???? ?????.

?? ?? ??? ??? ??????? ?????.

????? ??? ?? ?? ??? ????.

?? ???? ?? ??? ?? PHP ??? ???? "PHP ?? ??? ?? ????"? "PHP ?? ??? ??? ?? ?? ???? ??" ?? ???? ??? ????? ???.

?? ??? ???? ?? ?? verify.php ??? ?????

??? 4?? ?? ??? ?????

1619.png

<?php
session_start();
srand((double)microtime()*1000000);
while(($authnum=rand()%10000)<1000);//生成四位隨機(jī)整數(shù)驗證碼
$_SESSION['auth']=$authnum;

//生成驗證碼圖片
Header("Content-type: image/PNG");
$im = imagecreate(55,18);
$red = ImageColorAllocate($im, 255,0,0);
$white = ImageColorAllocate($im, 200,200,100);
$gray = ImageColorAllocate($im, 250,250,250);
$black = ImageColorAllocate($im, 120,120,50);

imagefill($im,60,20,$gray);

//將四位整數(shù)驗證碼繪入圖片
//位置交錯
for ($i = 0; $i < strlen($authnum); $i++)
{
   $i%2 == 0?$top = -1:$top = 3;
   imagestring($im, 6, 13*$i+4, 1, substr($authnum,$i,1), $white);
}

for($i=0;$i<100;$i++)   //加入干擾象素
{
   imagesetpixel($im, rand()%70 , rand()%30 , $black);
}

ImagePNG($im);
ImageDestroy($im);
?>


???? ??
||
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"/> <title>這是一個驗證碼文件</title> </head> <body> </body> </html>