Created
December 24, 2012 22:44
-
-
Save anonymous/4370909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("recaptchalib.php"); | |
$privatekey = ""; //<!----- your key here | |
$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. Please go back and try it again. <a href=\"javascript:history.go(-1)\">Back</a>" | |
//"(reCAPTCHA said: " . $resp->error . ") | |
echo "fail"; | |
} else { | |
echo "success"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment