极验证

public function getgeetest()
    {
        $geetestconfig = Config::get('geetestconfig');
        $geetest       = new Geetest((array) $geetestconfig);
        Session('geetest_userid', $_SERVER['REQUEST_TIME']);
        Session('geetest_status', $geetest->pre_process(Session('geetest_userid')));
        echo json_encode($geetest->get_response_str());
    }

use Geetest\Geetest;

use Flc\Dysms\Client;

use Flc\Dysms\Request\SendSms;


use think\Config;

use think\Db;

use think\Session;

function geetest(){
        var handler = function (captchaObj) {
            captchaObj.appendTo("#captcha");
            captchaObj.onSuccess(function () {
                //验证成功执行
             });
            captchaObj.onReady(function () {
                //加载完毕执行
            });
        };
        $.ajax({
            url: "/getgeetest&t=" + (new Date()).getTime(),
            type: "get",
            dataType: "json",
            success: function (data) {
                $("#captcha").html("");
                initGeetest({
                    gt: data.gt,
                    challenge: data.challenge,
                    product: "float", 
                    offline: !data.success 
                }, handler);
            }
        });
    }
    setTimeout(function(){geetest();},500);


打赏

看恩吧
网站不承担任何有关评论的责任
  • 最新评论
  • 总共条评论
取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦