-1
我通过这个包在我的symfony 3项目的注册页面添加了google的reCAPTCHA:github/EWZRecaptchaBundle。 submiting注册表单后,我有这样的:symfony 3上的reCAPTCHA超时或重复返回
$api_url = "https://www.google.com/recaptcha/api/siteverify?";
$secret_key = "----my-key----";
$api_key = "&secret=" . $secret_key;
$g_recaptcha_response = $_POST['g-recaptcha-response'];
$api_response = "&response=" . $g_recaptcha_response;
$api_remote_ip = "&remoteip=" . $_SERVER['REMOTE_ADDR'];
$url = $api_url . $api_key . $api_response . $api_remote_ip;
$response = json_decode(file_get_contents($url), true);
的responde连锁行业我:
array(4) { ["success"]=> bool(false) ["challenge_ts"]=> string(20) "2017-07-06T16:49:56Z" ["hostname"]=> string(14) "********.com" ["error-codes"]=> array(1) { [0]=> string(20) "timeout-or-duplicate" } }
这超时或-重复没有他们的指导中记录。我不知道如何解决这个问题或从哪里来。
你也可以检查: https://stackoverflow.com/questions/43678256/google-recaptcha-response-success-false-no-error-codes/45659347#45659347 –