Jump to content

reCAPTCHA issue


TinFoilLord

Recommended Posts

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 by TinFoilLord
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.