diff options
Diffstat (limited to 'recaptcha-php/example-captcha.php')
-rw-r--r-- | recaptcha-php/example-captcha.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/recaptcha-php/example-captcha.php b/recaptcha-php/example-captcha.php deleted file mode 100644 index f6f7fa0..0000000 --- a/recaptcha-php/example-captcha.php +++ /dev/null @@ -1,37 +0,0 @@ -<html> - <body> - <form action="" method="post"> -<?php - -require_once('recaptchalib.php'); - -// Get a key from https://www.google.com/recaptcha/admin/create -$publickey = ""; -$privatekey = ""; - -# the response from reCAPTCHA -$resp = null; -# the error code from reCAPTCHA, if any -$error = null; - -# was there a reCAPTCHA response? -if ($_POST["recaptcha_response_field"]) { - $resp = recaptcha_check_answer ($privatekey, - $_SERVER["REMOTE_ADDR"], - $_POST["recaptcha_challenge_field"], - $_POST["recaptcha_response_field"]); - - if ($resp->is_valid) { - echo "You got it!"; - } else { - # set the error code so that we can display it - $error = $resp->error; - } -} -echo recaptcha_get_html($publickey, $error); -?> - <br/> - <input type="submit" value="submit" /> - </form> - </body> -</html> |