后端开发|php教程
img,imagecoloralloca,rand,100,imagesetpixel
后端开发-php教程
正版微信源码对比,vscode不用gdb,ubuntu梯子,tomcat doc文档,sqlite 空间换时间,discuz文库插件,前端框架表格自动换行属性,爬虫要不要学,php 扩展模块,吉首seo优化方案,地方门户新闻网站源码,php 网页微信登录,html 模板打包下载lzw
<?php//画画布$img = imagecreatetruecolor(100, 40);//三种颜色$black = imagecolorallocate($img, 0x00, 0x00, 0x00);$green = imagecolorallocate($img, 0x00, 0xFF, 0x00);$white = imagecolorallocate($img, 0xFF, 0xFF, 0xFF);//填充白色imagefill($img,0,0,$white);//生成随机的验证码$code = \;for($i = 0; $i < 4; $i++) { $code .= rand(0, 9);}imagestring($img, 5, 10, 10, $code, $black);//加入噪点干扰for($i=0;$i<50;$i++) { imagesetpixel($img, rand(0, 100) , rand(0, 100) , $black); imagesetpixel($img, rand(0, 100) , rand(0, 100) , $green);}//png输出验证码jpeg输出到当前文件夹header("content-type: image/png");imagepng($img);imagejpeg($img, "./ok.jpeg", 75);imagedestroy($img);```<?php//画画布$img = imagecreatetruecolor(100, 40);//三种颜色$black = imagecolorallocate($img, 0x00, 0x00, 0x00);$green = imagecolorallocate($img, 0x00, 0xFF, 0x00);$white = imagecolorallocate($img, 0xFF, 0xFF, 0xFF);//填充白色imagefill($img,0,0,$white);//生成随机的验证码$code = \;for($i = 0; $i < 4; $i++) { $code .= rand(0, 9);}imagestring($img, 5, 10, 10, $code, $black);//加入噪点干扰for($i=0;$i<50;$i++) { imagesetpixel($img, rand(0, 100) , rand(0, 100) , $black); imagesetpixel($img, rand(0, 100) , rand(0, 100) , $green);}//png输出验证码jpeg输出到当前文件夹header("content-type: image/png");imagepng($img);imagejpeg($img, "./ok.jpeg", 75);imagedestroy($img);
公司企业网站源码下载,ubuntu下tar目录,四脚爬虫,libvrit php,外贸seo主lzw
‘).addClass(‘pre-numbering’).hide();
$(this).addClass(‘has-numbering’).parent().append($numbering);
for (i = 1; i <= lines; i++) { $numbering.append($(\).text(i)); }; $numbering.fadeIn(1700);}); });
进销存源码c s,vscode动感插件,vm下载ubuntu教程,tomcat查询版本,sqlite获取表头信息,jquery 注册步骤插件,前端框架数据埋点,爬虫帝国图片,php文件生成,SEO排名工具套装,亿景企业网站,免费网页素材下载,win10系统网站模板,jquery 聊天 页面,学生成绩管理系统v1.0,易语言 程序图标显示不正确lzw
以上就介绍了php中利用gd图片验证码生成和保存,包括了方面的内容,希望对PHP教学有兴趣的朋友有所帮助。