Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 18th, 2013  |  syntax: None  |  size: 0.55 KB  |  views: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.           //error_reporting(E_ALL ^ E_NOTICE);
  3.           require_once('./recaptchalib.php');
  4.           $privatekey = "6LeyOeYSAAAAAOg3j8mm7GO6oEbFvHDHgei_OaF_";
  5.  
  6.           # was there a reCAPTCHA response?
  7.                         $response = recaptcha_check_answer($privatekey,
  8.                                 $_SERVER["REMOTE_ADDR"],
  9.                                 $_POST["recaptcha_challenge_field"],
  10.                                 $_POST["recaptcha_response_field"]);
  11.                  
  12.                                 if ($response->is_valid) {
  13.                                                 echo "Yes, that was correct!";
  14.                                 } else {
  15.                                                 # set the error code so that we can display it
  16.                                 echo "Eh, That wasn't right. Try Again.";
  17.                  
  18.                                 }
  19. ?>