第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

加上這句話$_SESSION['authcode']=$capth_code;之后驗證碼圖片不顯示了

<?php

session_start();

$captch_code='';

$weight=100;

$height=30;

$image = imagecreatetruecolor($weight,$height);

$bgcolor=imagecolorallocate($image,255,255,255);

imagefill($image,0,0,$bgcolor);

//數(shù)字驗證碼


/*for($i=0;$i<4;$i++){

$fontsize =6;

$fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120));

$fontcontent = rand(0,9);

$x=($i*100/4)+rand(5,10);

$y=rand(5,10);

imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor);

}*/

//字母數(shù)字

for($i=0;$i<4;$i++){

$fontsize =6;

$fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120));

$data='abcdefghijklmnpqrstuvwxy13456789';

$fontcontent = substr($data,rand(0,strlen($data)-1),1);

$captch_code.=$fontcontent;

$x=($i*$weight/4)+rand(5,10);

$y=rand(5,$height-20);

imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor);

}

$_SESSION['authcode']=$capth_code;

//干擾元素,點

for($i=0;$i<200;$i++){

$pointcolor=imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200));

imagesetpixel($image,rand(1,$weight-1),rand(1,$height-1),$pointcolor);

}

//線

for($i=0;$i<3;$i++){

$linecolor=imagecolorallocate($image,rand(80,220),rand(80,220),rand(80,220));

imageline($image,rand(1,$weight-1),rand(1,$height-1),rand(1,$weight-1),rand(1,$height-1),$linecolor);

}

header('content-type:image/png');

imagepng($image);

imagedestroy($image);

?>


正在回答

1 回答

自己少打個字母...

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

加上這句話$_SESSION['authcode']=$capth_code;之后驗證碼圖片不顯示了

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號