我在网站注册表中使用了谷歌captcha作为谷歌示例:
<form method="post" action="htt://mysite/folder/verify.php">
<?php
require_once('htt://mysite/folder/recaptchalib.php');
$publickey = "your_public_key"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
<input type="submit" />
</form>
<!-- more of your HTML content -->
</body>
在verify.php中,此代码为
<?php
require_once('htt://mysite/folder/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
}
?>
一切都很好,captcha会找到正确/错误的captcha组合,但当我点击提交按钮时,它会显示一个带有URL的空白页面htt://mysite/folder/very.php它应该继续进行电子邮件验证,但它没有。。
你能给我们看看你的代码吗?事实上,如果它出现在正确的语句(if || else)
中,那么问题就出在代码中没有发布的部分。
您的邮件发送方法似乎发生了错误。