Advertisement
Guest User

Untitled

a guest
Aug 18th, 2013
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement