目前只用到了“英文图片验证码”,所以其他暂没测试。
如果有的同学研究代码会发现GifMerge类包含了class_chinese.php程序文件,而在压缩包里面没有,我就没提取了。
code生成方式未提供,方式大家自行选择,个人不推荐cookie记录,容易被cc。
先来看看index.php代码,如下:
<?php require_once "./class/class_seccode.php"; $code = new seccode(); $code->code = 'yadgen'; // 验证码 $code->type = 0; // 0英文图片验证码 1中文图片验证码 2Flash 验证码 3语音验证码 4位图验证码 $code->width = 100; // 验证码宽度 $code->height = 30; // 验证码高度 $code->background = 1; // 是否随机图片背景 $code->adulterate = 1; // 是否随机背景图形 $code->ttf = 1; // 是否随机使用ttf字体 $code->angle = 0; // 是否随机倾斜度 $code->warping = 0; // 是否随机扭曲 $code->scatter = 1; // 是否图片打散 $code->color = 1; // 是否随机颜色 $code->size = 1; // 是否随机大小 $code->shadow = 1; // 是否文字阴影 $code->animator = 1; // 是否GIF 动画 $code->fontpath = './static/image/seccode/font/'; // 字体路径 $code->datapath = './static/image/seccode/'; // 数据路径 $code->includepath = './class/'; // 核心程序文件路径 $code->display(); ?>
I really appreciate what you post. You have a new subscriber now.
Thanks for your nice experience to share with us. Really awesome article with plenty of informative things to be known for us.