无为清净楼资源网 Design By www.qnjia.com

本文实例为大家分享了php点击可刷新验证码的具体代码,供大家参考,具体内容如下

验证码类文件 CreateImg.class.php

<"Content-type: image/png"); 
} 
 
private function createCode() 
{ 
 $this->checkcode = strtoupper(substr(md5(rand()),0,$this->codenum)); 
} 
 
private function createImage() 
{ 
 $this->checkimage = @imagecreate($this->width,$this->height); 
 $back = imagecolorallocate($this->checkimage,255,255,255); 
 $border = imagecolorallocate($this->checkimage,0,0,0); 
 imagefilledrectangle($this->checkimage,0,0,$this->width - 1,$this->height - 1,$back); // 白色底 
 imagerectangle($this->checkimage,0,0,$this->width - 1,$this->height - 1,$border); // 黑色边框 
} 
 
private function setDisturbColor() 
{ 
 for ($i=0;$i<=200;$i++) 
 { 
 $this->disturbColor = imagecolorallocate($this->checkimage, rand(0,255), rand(0,255), rand(0,255)); 
 imagesetpixel($this->checkimage,rand(2,128),rand(2,38),$this->disturbColor); 
 } 
} 
 
private function writeCheckCodeToImage() 
{ 
 for ($i=0;$i<=$this->codenum;$i++) 
 { 
 $bg_color = imagecolorallocate ($this->checkimage, rand(0,255), rand(0,128), rand(0,255)); 
 $x = floor($this->width/$this->codenum)*$i; 
 $y = rand(0,$this->height-15); 
 imagechar ($this->checkimage, rand(5,8), $x, $y, $this->checkcode[$i], $bg_color); 
 } 
} 
function __destruct() 
{ 
 unset($this->width,$this->height,$this->codenum); 
} 
} 
"htmlcode">
<"htmlcode">
"content-type" content="text/html;charset=utf-8"> 
<script language="javascript"> 
function newgdcode(obj,url) { 
obj.src = url+ '"imgcode.php" alt="看不清楚,换一张" align="absmiddle" style="cursor: pointer;" onclick="javascript:newgdcode(this,this.src);" /> 
<form method="POST" name="form1" action="image.php"> 
<input type="text" name="test"> 
<br /> 
<input type="submit" name="submit" value="提交"> 
</form> 
</body> 
</head> 
</html> 

以上就是为大家介绍的php点击验证码即可刷新的全部代码,希望对大家的学习有所帮助。

标签:
php验证码点击刷新,thinkphp验证码刷新,php验证码刷新,点击刷新验证码,jquery点击刷新验证码,js点击刷新验证码

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?