代码如下
| 代码如下 | 复制代码 |
|
“static function buildImageVerify($length=4, $mode=1, $type='png', $width=80, $height=30, $verifyName='verify') { import('ORG.Util.String'); $randval = String::randString($length, $mode); session($verifyName, md5($randval)); $width = ($length * 10 + 10) > $width ? $length * 10 + 10 : $width; $fontcolor=C('fontcolor'); if ($type != 'gif' && function_exists('imagecreatetruecolor')) { $im = imagecreatetruecolor($width, $height); } else { $im = imagecreate($width, $height); } $r = Array(225, 255, 255, 223); $g = Array(225, 236, 237, 255); $b = Array(225, 236, 166, 125); $key = mt_rand(0, 3);
$borderColor = imagecolorallocate($im, 255, 255, 255); //边框色 imagefilledrectangle($im, 0, 0, $width - 1, $height - 1, $backColor);//着色 imagerectangle($im, 0, 0, $width - 1, $height - 1, $borderColor); $stringColor = imagecolorallocate($im, mt_rand(0, 200), mt_rand(0, 120), mt_rand(0, 120)); // 干扰 for ($i = 0; $i $color = imagecolorallocate($im,mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255)); imagesetthickness($im,2); imageline($im,mt_rand(0,$width),mt_rand(0,$height),mt_rand(0,$width),mt_rand(0,$height),$color); }
imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $stringColor); } //字体显示的位置和颜色 for ($i = 0; $i imagestring($im,50,$i*10+20,8,$randval{$i},$fontcolor); } //www.111com.net 雪花 for ($i=0;$i $color = imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255)); imagestring($im,mt_rand(1,5),mt_rand(0,$width-1),mt_rand(0,$height-1),mt_rand(1,9),$color); } Image::output($im, $type); } |
|
将文件中的此部分替换就可以了
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类
房东模拟器最新版2024
房东模拟器中文版是一个超级有趣的模拟经营类型的手游,这个游戏