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