Grow your CSS skills. Land your dream job.

Recaptcha help

  • # September 2, 2009 at 9:32 pm

    Hello,
    First off im not the most experienced webdeveloper so try and work with me here :D

    ive been implementing the Simple contact form 2 with recaptcha and i have registered with recaptcha with my keys and implemented them but in my form i am getting an error message like this at the bottom of my form

    Warning: require_once(recaptchalib.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/h/o/o/hookd/html/httpdocs/site/iframe5-1.php on line 85

    Fatal error: require_once() [function.require]: Failed opening required ‘recaptchalib.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/h/o/o/hookd/html/httpdocs/site/iframe5-1.php on line 85

    – i dont really understand what that means and i have been looking thru everything i got for a referance. here is how i have implemented it in to my page here is the site adress http://www.hookdentertainment.com/httpd … dex-5.html
    – and here is the code to run the form on the page

    Code:
    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





    (Required)

    (Required)

    (Optional)

    (Required)

    < ?php

    require_once('recaptchalib.php');

    // Get a key from http://recaptcha.net/api/getkey
    $publickey = " ";
    $privatekey = "";

    # the response from reCAPTCHA
    $resp = null;
    # the error code from reCAPTCHA, if any
    $error = null;

    # was there a reCAPTCHA response?
    if ($_POST["recaptcha_response_field"]) {
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);

    if ($resp->is_valid) {
    echo “You got it!”;
    } else {
    # set the error code so that we can display it
    $error = $resp->error;
    }
    }
    echo recaptcha_get_html($publickey, $error);
    require_once (“recaptchalib.php”);

    // get a key at http://mailhide.recaptcha.net/apikey
    $mailhide_pubkey = ”;
    $mailhide_privkey = ”;

    ?>

    The Mailhide version of example@example.com is
    < ? echo recaptcha_mailhide_html ($mailhide_pubkey, $mailhide_privkey, "hookdent@yahoo.com"); ?>.

    The url for the email is:
    < ? echo recaptcha_mailhide_url ($mailhide_pubkey, $mailhide_privkey, "hookent@yahoo.com"); ?>


    — i took out the keys for sercurity reasons ofcourse but can anyone help me out im really just having a problem with set up ive looked thru everything. im pretty sure i have all the php files and looked thru all the help files here and with recaptcha im stumpped can anyone give me any suggestions possibly. im just not understanding the problem :|

    # September 3, 2009 at 8:21 am

    It seems to me that the file recaptchalib.php does not exsist in the plugin’s folder. I suggest you take a look and see if it is there. If it isn’t I would reupload the plugin. :)

    # September 3, 2009 at 1:08 pm

    Thanx for the reply :)
    the recaptchlib.php is included along with the contactengine.php, contactthanks.php, error.html, css sheet and all the other nessesary files does my code structure look correct? I’m not sure I understand what u mean by plugins folder isn’t the recaptchalib.php suposed to be in the same folder as the engine? Am I missing a file?

    # September 4, 2009 at 10:20 am

    Is there an example of this some where in these forums?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".