我最近设置了 reCaptcha 并且一切工作正常,但是当我输入正确的验证码时,我得到的只是一个白屏 - 我知道为什么会这样,因为我应该告诉 reCaptcha 去哪里。
我只是不太了解PHP,不知道该放什么,有人可以帮助我吗,php代码是:
<?php
require_once('recaptchalib.php');
$privatekey = "YOUR_PRIVATE_KEY";
$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 {
// Your code here to handle a successful verification
}
?>