Merge branch 'dev' into live
[dylansserver.git] / captcha.php
1 <?php
2
3 require_once('index.php');
4
5 $page = new blank_page();
6
7 require_once('includes/recaptchalib.php');
8 $resp = recaptcha_check_answer ($page->recaptcha_privatekey,
9 $_SERVER["REMOTE_ADDR"],
10 $_POST["recaptcha_challenge_field"],
11 $_POST["recaptcha_response_field"]);
12 if (!$resp->is_valid) {
13 die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
14 "(reCAPTCHA said: " . $resp->error . ")");
15 } else {
16 echo "success!";
17 }
18
19 ?>