求源碼?。?!
求誰(shuí)發(fā)下源碼?感激不盡,實(shí)習(xí)代碼中有用到驗(yàn)證碼
求誰(shuí)發(fā)下源碼?感激不盡,實(shí)習(xí)代碼中有用到驗(yàn)證碼
2016-06-24
http://pan.baidu.com/s/1o6pAqOM 密碼: 369x
<?php
session_start();
$image=imagecreatetruecolor(200,60);
$bgcolor=imagecolorallocate($image,255,255,255);
imagefill($image,0,0,$bgcolor);
/*
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);
}
*/
$fontface='FZYTK.TTF';
$strdb=array('慕','課','網(wǎng)','贊');
$captch_code='';
for($i=0;$i<4;$i++){
$fontcolor=imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120));
$cn=$strdb[$i];
$captch_code.=$cn;
imagettftext($image,mt_rand(20,24),mt_rand(-60,60),(40*$i+20),mt_rand(30,35),$fontcolor,$fontface,$cn);
}
$_SESSION['authcode']=$captch_code;
for($i=0;$i<200;$i++){
$pointcolor=imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200));
imagesetpixel($image,rand(1,199),rand(1,59),$pointcolor);
}
for($i=0;$i<3;$i++){
$linecolor=imagecolorallocate($image,rand(80,220),rand(80,220),rand(80,220));
imageline($image,rand(1,199),rand(1,59),rand(1,199),rand(1,59),$linecolor);
}
header('content-type:image/png');
imagepng($image);
imagedestroy($image);
舉報(bào)
2019-01-24
出國(guó)留學(xué)教育培訓(xùn)機(jī)構(gòu)類網(wǎng)站織夢(mèng)模板(帶手機(jī)端) 免費(fèi)源碼下載:http://www.hmpym.cn/moban/1298.html