7 Replies Latest reply on Apr 7, 2010 8:28 AM by WRobN1

    reCAPTCHA wont work...


      I asked this on the reCAPTCHA forum as well.


      But because of the many people here i see more chance that i get my awnser here. (reCAPTCHA forum is a bit slow)


      I did a simple test to look if reCAPTCHA works.
      These following 2 PHP files; "form" and "verify" should work but dont.
      The reCap img shows but the verification goes wrong.
      It always result in this text:

      The reCAPTCHA wasn't entered correctly. Go back and try it again.
      (reCAPTCHA said: )


      This is my php test form (only recaptcha);

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// 
      <html xmlns="http://www.w3.org/1999/xhtml"> 
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
      <title>Untitled Document</title> 
      <form method="post" action="verify.php"> 
           $publickey = "xXxXxXxXxXxXxXxXx"; 
           echo recaptcha_get_html($publickey); 



      And this the verify.php :


       $privatekey = "xXxXxXxXxXxXxXxXx"; 
       $response = recaptcha_check_answer ($privatekey, 
       if (!$resp->is_valid) { 
         // What happens when the CAPTCHA was entered incorrectly 
         die ("The reCAPTCHA wasn't entered correctly. Go back and try it 
      again." . 
              "(reCAPTCHA said: " . $resp->error . ")"); 




      The problem are the 2 php files above. They wont work and i dont know

      Its the basic code from the reCAP site.

      It should work but it doesnt.




      (I need to keep those 2 files seperated. An example from reCAPTCHA wich came with the library file works, but has both functions in the same file. And its different from the code i got from the recap site. The weirdest thing is that im not the only one using this code but probably one of the few who dont get it working.)