好好学习,东方不败。

做个努力的小伙。

  博客园  :: 首页  :: 新随笔  ::  ::  :: 管理

2013年12月23日

摘要: 一个简单实用的php验证码类,分享出来 ,供大家参考。代码如下:image=imagecreate($this->width,$this->hight);$this->color=imagecolorallocate($this->image,$this->red,$this->green,$this->blue);returnimagefill($this->image,0,0,$this->color);}functioncreatepix()//干扰因素{for($this->i=1;$this->ipixnum;$thi 阅读全文
posted @ 2013-12-23 06:56 snowfly123 阅读(249) 评论(0) 推荐(0) 编辑

摘要: 网上有很多的php随机数与验证码的代码与文章,真正适用的没有几个。索性自己搞一个吧。开始本节的php教程吧,以下代码的实现,主要做到可以很好区分一个get_code(),另一个create_check_image(),输出图像直接调用后面的,session()取验证码时直接get_code()就ok,顺带提下使用session时必须将session_star()放在最前面。代码如下:[php]view plaincopyget_code(5,7);$image=$randcode->create_check_image($checkstring);echo$image;*/?>参考 阅读全文
posted @ 2013-12-23 06:54 snowfly123 阅读(527) 评论(0) 推荐(0) 编辑