最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个简单php验证码程序代码
时间:2022-06-24 15:54:18 编辑:袖梨 来源:一聚教程网
验证码识别一般分为以下几个步骤:
1. 取出字模
2. 二值化
3. 计算特征
4. 对照样本
| 代码如下 | 复制代码 |
|
$_img = imagecreatetruecolor($_width, $_height); $_white = imagecolorallocate($_img, 250, 250, 250); imagefill($_img, 0, 0, $_white); $_gray = imagecolorallocate($_img, 196, 196, 196); imagerectangle($_img, 0, 0, $_width-1, $_height-1, $_gray); for ($i=0; $i
$_md_color = imagecolorallocate($_img, mt_rand(200,255), mt_rand(200,255), mt_rand(200,255)); for ($i=0; $i
$_md_color = imagecolorallocate($_img, mt_rand(200,255), mt_rand(200,255), mt_rand(200,255)); for ($i=0; $i
$_md_color = imagecolorallocate($_img, mt_rand(0,102), mt_rand(0,102), mt_rand(0,102)); header("Content-Type:image/png"); imagepng($_img); imagedestroy($_img); |
|
验证码使用方法
| 代码如下 | 复制代码 |
|
$getcode = $_POST['code']; if( $_SESSION["code"] = $getcode ) |
|
相关文章
- 嘟嘟传奇嘟嘟之恋任务攻略 03-21
- 《元启世界》法师玩法攻略 03-21
- 耐玩的角色扮演类网络游戏推荐哪些 2026高人气的角色扮演手游下载分享 03-21
- 三角洲行动航天基地每日密码3月20日-航天基地3月20日密码 03-21
- 热门的像素射击游戏排行榜前五推荐 2026值得下载的像素射击游戏汇总 03-21
- 《生存33天》联盟对决玩法介绍 03-21