Questions tagged «recaptcha-v3»

12
如何在服务器端验证Google reCAPTCHA v3?
我刚刚设置了带有复选框的新Google Recaptcha,它在前端工作正常,但是我不知道如何使用PHP在服务器端处理它。我尝试使用下面的旧代码,但是即使验证码无效,也会发送表格。 require_once('recaptchalib.php'); $privatekey = "my key"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $errCapt='<p style="color:#D6012C ">The CAPTCHA Code wasnot entered correctly.</p>';}
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.