-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 –