免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码

标题: 验证码相关问题 [打印本页]

作者: fanlingyun    时间: 2015-7-14 15:52
标题: 验证码相关问题
现在的验证码看起来非常模糊,可以在function/ourphp_validatecode.class.php这个文件里修改,我改了一下分享一下将private $charset = 'abcdefghkmnprstuvwxyz23456789';    //随机因子
改成private $charset = '23456789';    //随机因子
这样的话就全部是数字看起来简单一些
然后将
//生成线条、雪花
    private function createLine() {


这里面的内容注释啦,就不会颜色线条和雪花,这样背景就是纯色
//生成线条、雪花
    private function createLine() {
        //for ($i=0;$i<6;$i++) {
         //   $color = imagecolorallocate($this->img,mt_rand(0,156),mt_rand(0,156),mt_rand(0,156));
         //   imageline($this->img,mt_rand(0,$this->width),mt_rand(0,$this->height),mt_rand(0,$this->width),mt_rand(0,$this->height),$color);
        //}
        //for ($i=0;$i<100;$i++) {
        //    $color = imagecolorallocate($this->img,mt_rand(200,255),mt_rand(200,255),mt_rand(200,255));
        //    imagestring($this->img,mt_rand(1,5),mt_rand(0,$this->width),mt_rand(0,$this->height),'*',$color);
       // }
    }



还有在输入验证码的时候后台的验证码会刷新,有的客户不喜欢可以直接将下页的红色代码删除就行啦
<tr>
            <td><div align="right">验证码:</div></td>
            <td><input type="text" name="code" class="input3" datatype="*" onfocus="document.getElementById('checkcode').src+='?'" /> <font color="#FF0000">*</font>&nbsp;<img title="点击刷新" id="checkcode" src="[.$webpath.]function/ourphp_code.php" align="absbottom" width="80" height="25"></img></td>
          </tr>




作者: 小白    时间: 2015-7-14 16:49
太简单 不安全 暂时没有发现验证码模糊的问题
作者: admin    时间: 2015-7-14 17:07
谢谢分享




欢迎光临 免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码 (http://www.ourphp.net/club/) Powered by Discuz! X3.2