TinFoilLord Posted May 6, 2014 Share Posted May 6, 2014 (edited) reCAPTCHA keeps saying the captcha has been inputted incorrectly, however that is not the case. I don't see what's wrong with it, I've been trying for hours, looked all over and not found a solution to my problem, so I decided I'd ask here, after hours of no luck on IRC. Verify.php code: <?php require_once('recaptchalib.php'); $privatekey = "snip"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); 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 . ")"); } else { //snip } ?> Form code: <form class="email" action="verify.php"> <input type="text" name="email" class="field" onfocus="if(this.value=='Get Notified (Email Address)') this.value='';" onblur="if(this.value=='' || this.value==' ') this.value='Get Notified (Email Address)';" value="Get Notified (Email Address)" /> <input type="submit" class="submit2" /><br /> <center><script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=6LfrDPMSAAAAAN2OtRkDrGQWof2K2hY10tQ7Y7Uy"> </script> <noscript> <iframe src="https://www.google.com/recaptcha/api/noscript?k=6LfrDPMSAAAAAN2OtRkDrGQWof2K2hY10tQ7Y7Uy" height="300" width="500" frameborder="0"></iframe><br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript></center> </form> Edited May 6, 2014 by TinFoilLord Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.