Grow your CSS skills. Land your dream job.

Re-captcha is not working on Nicesimple contact form

  • # February 5, 2013 at 10:19 am

    I tried niceandsimple contact from this [website](http://css-tricks.com/nice-and-simple-contact-form/ “”), worked wonderful. But after getting so many spam mails, i decided to add recaptcha although I followed all instructions still its not working. [Tutorial Link](http://css-tricks.com/examples/NiceSimpleContactForm2/ “link”)
    here is my [website](http://webdesignplay.com “webdesignplay.com”)
    and here is code



    >

    < ?php

    require_once(‘recaptchalib.php’);
    $publickey = “6Ld9ltwSAAAAAKnB4ANn4baVx@@@@@@@@”;
    $privatekey = “6Ld9ltwSAAAAAGa8lKr7QzaDD52M********”;

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

    # are we submitting the page?
    if ($_POST["submit"]) {
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);

    if ($resp->is_valid) {
    echo “You got it!”;
    # in a real application, you should send an email, create an account, etc
    } else {
    # set the error code so that we can display it. You could also use
    # die (“reCAPTCHA failed”), but using the error message is
    # more user friendly
    $error = $resp->error;
    }
    }
    echo recaptcha_get_html($publickey, $error);
    ?>


    # January 5, 2014 at 5:03 pm

    Can someone share his personal experience using game-playing captcha alternative like PlayThru from AYAH? Any pros/cons would be welcome. Thanks.

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

You must be logged in to reply to this topic.

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