我无法理解在3次尝试失败后将Google的reCaptcha附加到表单登录的概念。 一旦3次尝试受到挑战,我怎样才能附上reCaptcha?
我的PHP reCaptcha:
require_once('recaptchalib.php');
$privatekey = "MyPublicKey";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
//
}
实现这一目标的最佳方法是什么? 我应该使用js吗?
非常感谢任何帮助或指导。
谢谢,