Example #1
0
 public function verify()
 {
     //位数,类型,图像格式,宽度,高度
     import('ORG.Util.Image');
     //读取thinkPHP框架下的Image类
     Image::buildImageVerify(1, 1, 'png', 60, 25);
 }
Example #2
0
 public function verify()
 {
     //导入验证码类
     import('ORG.Util.Image');
     //对验证码的输出格式进行设置,生成的验证码会被进行md5加密,并存储在session中
     Image::buildImageVerify(4, 1, 'png', 80, 25);
 }
Example #3
0
 public function code()
 {
     $w = isset($_GET['w']) ? $_GET['w'] : 30;
     $h = isset($_GET['h']) ? $_GET['h'] : 30;
     import('ORG.Util.Image');
     Image::buildImageVerify(2, 1, 'png', $w, $h, 'code');
 }
 public function verifyCode()
 {
     //导入验证码类
     //因为图像处理类并不是系统当中的核心类,因此,我们在使用的时候,他不会自动加载过来。我们需要导入一次
     import('ORG.Util.Image');
     //代表当前项目的LIB文件夹
     //import('@.Org.Image');
     //第一个参数为长度 默认为4个长度
     //第二项为模式,类型  0字母(默认) 1数字,2大写字母,3为小写字母 4中文,5混合
     //第三个,图像输出的类型 默认为png ,有些同学的服务器上面没有开png的话,请将此处可以直接改
     //第四项,宽度  是根据长度自动计算
     //第五项,高度  22
     // 第六项,验证码保存在session当中的名称,不建议大家修改
     //Image::buildImageVerify(4,5,'png',90,30,'signin_verify_code');
     Image::buildImageVerify();
     //Image::GBVerify();
     //length
     //type
     //width
     //height
     //fontface
     //verifyName
     //buildImageVerify();
     // simhei.ttf
 }
 public function verify()
 {
     import("ORG.Util.Image");
     //图像操作类库
     $type = isset($_GET['type']) ? $_GET['type'] : 'gif';
     Image::buildImageVerify(4, 1, $type);
 }
Example #6
0
 /**
  * 验证码
  */
 public function verify_code()
 {
     $w = isset($_GET['w']) ? (int) $_GET['w'] : 50;
     $h = isset($_GET['h']) ? (int) $_GET['h'] : 30;
     import("ORG.Util.Image");
     Image::buildImageVerify(4, 1, 'png', $w, $h);
 }
 function verify()
 {
     //导入验证码类
     import('ORG.Util.Image');
     //输出产生验证码
     Image::buildImageVerify();
 }
Example #8
0
 public function verify()
 {
     //导入ThinkPHP扩展中的验证码库
     import('ORG.Util.Image');
     //调用验证码生成函数,第一个参数表示验证码位数,第二个参数表示类型
     //第二个参数=5时为大小写+数字的混合模式,严格区分大小写
     Image::buildImageVerify(1, 1, 'png');
 }
 public function verify()
 {
     import('ORG.Util.Image');
     // 本地用
     // import("@.ORG.Image");//去服务器用
     Image::buildImageVerify();
     // Image::buildImageVerify(5,1,png,50,26);
 }
Example #10
0
 public function Verify()
 {
     // import("ORG.Util.Image");
     // Image::buildImageVerify(4, 5, 'png', 60, 34);
     import("ORG.Util.Image");
     ob_end_clean();
     Image::buildImageVerify();
 }
 function verify()
 {
     import('ORG.Util.Image');
     if (isset($_REQUEST['adv'])) {
         Image::showAdvVerify();
     } else {
         Image::buildImageVerify();
     }
 }
 public function verify()
 {
     //框架自带的验证码
     import('ORG.Util.Image');
     Image::buildImageVerify();
     // //后盾网提供的验证码库
     // echo APP_PATH;
     // import('Class.Image', APP_PATH, '.php');
     // Image::verify();
 }
Example #13
0
function m__vcode()
{
    require_once dirname(__FILE__) . "/core/imgcode.class.php";
    $name = !isset($_GET['c']) || $_GET['c'] == '' ? 'login' : $_GET['c'];
    $w = !isset($_GET['w']) || $_GET['w'] == '' ? '60' : $_GET['w'];
    $h = !isset($_GET['h']) || $_GET['h'] == '' ? '24' : $_GET['h'];
    if ($name == 'login' || $name == 'reg' || $name == 'feedback' || $name == 'tougao') {
        Image::buildImageVerify(5, 2, 'png', $w, $h, $name);
    }
}
 /**
  * 验证码实现
  */
 public function code()
 {
     //$w=$_GET['w'];//标签库文件里定义了这个w变量了__APP__/Public/verify?w={$width}&h={$height}
     $w = I('get.w');
     $h = I('get.h');
     //$h=$_GET['h'];//标签库文件里定义了这个h变量了__APP__/Public/verify?w={$width}&h={$height}
     import('ORG.Util.Image');
     //引入图片类文件
     Image::buildImageVerify(4, 1, 'png', $w, $h, 'verify');
     //生成图片验证代码 0 字母 1 数字 2 大写字母 3 小写字母 4中文 5混合  verify是验证码的SESSION记录名称
 }
 /**
  *生成并设置验证码
  */
 public function verify()
 {
     $sessionMysql = new SessionMysql();
     ////////设置验证码//////
     $rand = '';
     for ($i = 0; $i < 4; $i++) {
         $rand .= dechex(mt_rand(1, 15));
         //十六进制1~F
     }
     $_SESSION['verify'] = md5($rand);
     ////////生成并输出验证码////////
     import('Image');
     Image::buildImageVerify('png', 50, 30, $rand);
 }
Example #16
0
 /**
  * 验证码
  * @author Terry <*****@*****.**>
  * @date 2013-03-23
  */
 public function verify()
 {
     import('ORG.Util.Image');
     $ary_data = D('Config')->getCfgByModule('CODE_SET');
     if (!empty($ary_data) && is_array($ary_data)) {
         $ary_data['RECODESIZE'] = json_decode($ary_data['RECODESIZE'], true);
         $ary_data['BACODESIZE'] = json_decode($ary_data['BACODESIZE'], true);
     }
     if (!empty($ary_data['BUILDTYPE']) && $ary_data['BUILDTYPE'] == '4') {
         Image::GBVerify($ary_data['BACODENUMS'], $ary_data['EXPANDTYPE'], $ary_data['BACODESIZE']['width'], $ary_data['BACODESIZE']['height'], 'simhei.ttf', 'code');
     } else {
         Image::buildImageVerify($ary_data['BACODENUMS'], $ary_data['BUILDTYPE'], $ary_data['EXPANDTYPE'], $ary_data['BACODESIZE']['width'], $ary_data['BACODESIZE']['height'], 'code');
     }
     //        Image::buildImageVerify(6, 1, 'png', 100, 38, 'code');
 }
Example #17
0
 /**
  * 验证码
  * @author Terry <*****@*****.**>
  * @date 2013-03-23
  */
 public function Verify()
 {
     import('ORG.Util.Image');
     $ary_data = D('Config')->getCfgByModule('CODE_SET');
     if (!empty($ary_data) && is_array($ary_data)) {
         $ary_data['RECODESIZE'] = json_decode($ary_data['RECODESIZE'], true);
         $ary_data['BACODESIZE'] = json_decode($ary_data['BACODESIZE'], true);
     }
     //        echo "<pre>";print_r($ary_data);exit;
     if (!empty($ary_data['BUILDTYPE']) && $ary_data['BUILDTYPE'] == '4') {
         Image::GBVerify($ary_data['RECODENUMS'], $ary_data['EXPANDTYPE'], $ary_data['RECODESIZE']['width'], $ary_data['RECODESIZE']['height'], 'simhei.ttf', 'av');
     } else {
         Image::buildImageVerify($ary_data['RECODENUMS'], $ary_data['BUILDTYPE'], $ary_data['EXPANDTYPE'], $ary_data['RECODESIZE']['width'], $ary_data['RECODESIZE']['height'], 'av');
     }
 }
Example #18
0
 public static function get()
 {
     $code_list = array();
     for ($num = 48; $num <= 57; $num++) {
         $code_list[] = chr($num);
     }
     for ($num = 65; $num <= 90; $num++) {
         $code_list[] = chr($num);
     }
     for ($num = 97; $num <= 122; $num++) {
         //$code_list[] = chr($num);
     }
     for ($i = 0; $i < 4; $i++) {
         $code[] = $code_list[array_rand($code_list, 1)];
     }
     $_SESSION['verify'] = strtolower(implode('', $code));
     return Image::buildImageVerify(implode('', $code));
 }
Example #19
0
 public function verify()
 {
     import('ORG.Util.Image');
     Image::buildImageVerify(4, 1, gif, 48, 22, 'verify');
 }
Example #20
0
 public function _empty()
 {
     Image::buildImageVerify(4, 2, 'png', '300', '100', 'captcha');
 }
Example #21
0
 public function verify()
 {
     import('ORG.Util.Image');
     Image::buildImageVerify();
 }
Example #22
0
 public function verifyLogin()
 {
     Image::buildImageVerify(4, 1, 'png', 0, 28, 'loginverify');
 }
Example #23
0
 public function verify()
 {
     import("ORG.Util.Image");
     Image::buildImageVerify($length = 4, $mode = 2, $type = 'png', $width = 48, $height = 22, $verifyName = 'verify');
 }
 public function verify()
 {
     $type = isset($_GET['type']) ? $_GET['type'] : 'gif';
     import("ORG.Util.Image");
     Image::buildImageVerify(4, 1, $type, 48, 20);
 }
Example #25
0
 public function verify()
 {
     import("ORG.Util.Image");
     ob_end_clean();
     Image::buildImageVerify(4, 1, 'png', 98, 28);
 }
 public function verify()
 {
     import('ORG.Util.Image');
     Image::buildImageVerify(1, 1, 'png', 80, 25);
 }
Example #27
0
 public function captcha()
 {
     Image::buildImageVerify(4, 1, 'gif', '50', '24', 'captcha');
 }
Example #28
0
 public function verify()
 {
     import("@.ORG.Image");
     Image::buildImageVerify();
 }
Example #29
0
 public function verify()
 {
     Image::buildImageVerify();
 }
Example #30
0
 /**
  * 获取验证码图片操作
  */
 public function verify()
 {
     tsload(ADDON_PATH . '/library/Image.class.php');
     tsload(ADDON_PATH . '/library/String.class.php');
     Image::buildImageVerify();
 }