2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > [php 随机生成验证码]

[php 随机生成验证码]

时间:2020-07-09 01:37:28

相关推荐

[php 随机生成验证码]

后端开发|php教程

[php 随机生成验证码]

后端开发-php教程

名片网页源码,ubuntu更新apt很慢,tomcat数据库连接密码,58同城卖房 爬虫,php正则表达式汉族,高新seo优化lzw

<?phpsession_start();//随机生成验证码的字符串function random($len) { $srcstr="ABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; mt_srand(); $strs=""; for($i=0;$i<$len;$i++) { $strs.=$srcstr[mt_rand(0,33)]; } return ($strs);}$str=random(5); //随机生成的字符串$width=60; //验证码图片的宽度$height=25; //验证码图片的高度//Date in the pastheader("Expires:Mon,26 Jul 1997 05:00:00 GMT");//always modified header("Last-Modified:".gmdate("D,d M Y H:i:s")."GMT");//HTTP/1.1 header("Cache-Control:no-store,no-cache,must-revalidate");header("Cache-Control:post-check=0,pre-check=0",false);//HTTP/1.0header("Pragma:no-cache");header("Content-Type:image/png"); $im=imagecreate($width,$height);$back=imagecolorallocate($im,0xFF,0xFF,0xFF); //背景色$pix=imagecolorallocate($im,187,190,247); //模糊点颜色$font=imagecolorallocate($im,41,163,238); //字体色//绘制1000个模糊作用的点mt_srand();for($i=0;$i

@header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");//标记内容最后修改时间@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");//内容过期时间 @header("Cache-Control: no-cache, must-revalidate" );//强制不缓存@header("Pragma: no-cache" );//禁止本页被缓存

一般情况下browser会保存曾经访问过的页面,二次访问时就直接提取缓存,不需要再向服务器请求了。

虚拟物品分销源码,ubuntu 全量 安装,tomcat服务器重新开启,爬虫怎么做好,php 对接百度网盘,汶上seo优化lzw

而这里需要保证每次的验证码不同,所以要强制浏览器每次都向服务器请求。

论坛顶贴机源码,阿里云ubuntu 规则,图书封面爬虫软件,php items(),seo666123lzw

验证码(CAPTCHA)是“Completely Automated Public Turing test to tell Computers and Humans Apart”(全自动区分计算机和人类的图灵测试)的缩写,是一种区分用户是计算机还是人的公共全自动程序。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。