2017-07-06 8 views
-1

symfony 3プロジェクトの私の登録ページに、このバンドル経由でgoogleのreCAPTCHAを追加しました:github/EWZRecaptchaBundle。 respondeが私にこのGIV 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); 

:登録フォームをsubmitingした後、私はこれを持って

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" } } 

をこのタイムアウトまたは-重複は、そのガイドに記載されていません。私はこれをどのように修正するか、どこから来るのか分かりません。

+0

一つでもこれを確認することができます。 https://stackoverflow.com/questions/43678256/google-recaptcha-response-success-false-no-error-codes/45659347#45659347 –

答えて

1

このバンドルではこれを行いません(キャプチャをチェックして有効または無効に設定してください)。またはタイムアウト...のカスタムコールを作成していますbindRequest(と思う))

+0

をうん、バンドルは私のためにそれを行います – symfonypleb

関連する問題