TinFoilLord Posted May 6, 2014 Share Posted May 6, 2014 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> Link to comment https://forums.phpfreaks.com/topic/288272-recaptcha-issue/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.