Jump to content

Implementing reCAPTCHA


Username:

Recommended Posts

Can someone help me please?....

 

I'm using this

 

<form name="form1" method="post" action="create-b.php" enctype="application/x-www-form-urlencoded" style="margin:0px"><input name="name" value="Anonymous" type="text" MAXLENGTH="15" style="position:absolute;width:650px;left:67px;top:142px;z-index:4"><input name="subject" value="(No subject)" MAXLENGTH="15" type="text" style="position:absolute;width:650px;left:67px;top:166px;z-index:5"><textarea name="body" MAXLENGTH="255" type="text" style="position:absolute;left:67px;top:191px;width:650px;height:98px;z-index:6"></textarea><div id="captcha" style="position:absolute; overflow:hidden; left:10px; top:296px; z-index:8"><input name="submit" type="submit" value="Create thread" style="position:absolute;left:614px;top:291px;z-index:7"><?php  require_once('captc/recaptchalib.php');  $publickey = "**************************************";  echo recaptcha_get_html($publickey);?></form>

 

On the HTML side and this

 

 

  require_once('captc/recaptchalib.php');  $privatekey = "************************";  $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 ("<font color='red'><font size='12'><strong><center>The verification code you entered appears to be incorrect!");  } else {CONTENT CONTENT CONTENT CONTENT CONTENT ETC

 

 

But it always returns "The verification code you entered appears to be incorrect!" Any idea what I'm doing wrong?...

Link to comment
https://forums.phpfreaks.com/topic/214250-implementing-recaptcha/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.