Code: Select all
$cookie_expi = Time() + 3600;
if ($_POST["recaptcha_response_field"])
{
require_once('captcha/recaptchalib.php');
$publickey = "6Lf4escSAAAAAN9OLgHanRuVMG8xJQUaQ3Cdd6Dt";
$privatekey = "***NOPE***";
$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("<title>Tetgud loto - Neteisingas kodas</title><br /><h3><center>Neteisingas kodas</center><br /><center><a href='zltglvform.php'>Bandyti dar karta</a></center></h3>");
} else {
setcookie("tetgudlotocaptchacount",0,$cookie_expi);
// Your code here to handle a successful verification
}
}