symfony 3 上的 reCAPTCHA 超时或重复 return
Timeout or duplicate return from reCAPTCHA on symfony 3
我通过这个包将 google 的 reCAPTCHA 添加到我的 symfony 3 项目的注册页面:github/EWZRecaptchaBundle。提交注册表后我有这个:
$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);
回复者给我这个:
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" } }
这个 timeout-or-duplicate 没有记录在他们的指南中。我不知道如何解决这个问题或它来自哪里。
此捆绑包是否已经为您执行此操作(检查验证码并将表单设置为有效或无效),因此,进行自定义调用,重复 或超时...(因为它已经由 bindRequest 上的 bundle 完成(我认为))
我通过这个包将 google 的 reCAPTCHA 添加到我的 symfony 3 项目的注册页面:github/EWZRecaptchaBundle。提交注册表后我有这个:
$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);
回复者给我这个:
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" } }
这个 timeout-or-duplicate 没有记录在他们的指南中。我不知道如何解决这个问题或它来自哪里。
此捆绑包是否已经为您执行此操作(检查验证码并将表单设置为有效或无效),因此,进行自定义调用,重复 或超时...(因为它已经由 bindRequest 上的 bundle 完成(我认为))