【问题标题】:How to fix google recaptcha?如何修复谷歌recaptcha?
【发布时间】:2017-02-03 16:17:21
【问题描述】:

验证码:vista aperto

我输入“vista”,然后点击按钮登录。登录成功。如果验证码不完整,应该是登陆不成功吧。

流程是否如此? 还是有办法解决?

我使用库 recaptcha。我使用codeigniter框架。我的图书馆是这样的:

class Google_recaptcha
{
    function check_captcha($private_key, $remote_ip, $challenge, $response)
    {   
        if (!preg_match('/[^A-Za-z0-9\s]/', $response))
        {
            $CI =& get_instance();
            $CI->load->library('scurl');
            $array['site'] = 'http://www.google.com/recaptcha/api/verify';
            $array['post'] = 'privatekey='.$private_key.'&remoteip='.$remote_ip.'&challenge='.$challenge.'&response='.$response;
            $array['referer'] = '';
            $array['method'] = 'POST';

            $response = $CI->scurl->scurl($array);
            $response = explode("\n", $response);
        }
        else
            $response = array('false');

        return $response;
    }
}

【问题讨论】:

标签: php codeigniter recaptcha


【解决方案1】:

不要使用那些旧脚本。试试 reCaptcha。它好多了。只需单击授权,无需输入任何内容。有时你必须选择一种图片。您可以从 Google 的 Web API 控制安全级别。 https://www.google.com/recaptcha/intro/index.html

【讨论】:

    【解决方案2】:

    这是很老的recapcha版本。 google不支持一个。尝试新版本的 recapcha 。通过 google 运行的表单提交和验证可以轻松导航。 https://www.google.com/recaptcha/intro/index.html

    & 它还有用于 CodeIgniter 的 reCAPTCHA 库 https://github.com/appleboy/CodeIgniter-reCAPTCHA

    示例代码 http://www.technicalkeeda.com/php-codeigniter/google-new-recaptcha

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-06-17
      • 2022-06-16
      • 2019-09-04
      • 1970-01-01
      • 1970-01-01
      • 2018-08-10
      • 2018-03-19
      相关资源
      最近更新 更多