www.webdeveloper.com
Results 1 to 5 of 5

Thread: problem in recaptcha

  1. #1
    Join Date
    Apr 2012
    Posts
    1

    problem in recaptcha

    hi everybody,
    iam new to php and this is my first post. i have some problem in recaptcha. the source code are as follows:

    <?php
    if (isset($_POST['submit1']))
    {
    require_once('recaptchalib.php');
    $privatekey = "xxxxxxxx";
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid)
    {
    echo"
    <center>
    sorry wrong input please try again
    </center>
    ";
    }
    else
    {
    echo "successful";
    }
    }
    ?>

    <html>
    <body bgcolor="000000" text="ffffff" >
    <center>
    <form method = "post" action = "index.php">
    name <br> <input type = "text" name = "name"> <br>
    email <br> <input type = "text" name = "email"> <br>
    location <br> <input type = "text" name = "location"> <br>
    message <br> <textarea cols ="50" rows = "5" name = "message"> </textarea> <br>

    <?php
    require_once('recaptchalib.php');
    $publickey = "xxxxxxxx"; // you got this from the signup page
    echo recaptcha_get_html($publickey);
    ?>

    <br><input type = "submit" name= "submit1" value = "post">
    <input type = "reset" value = "reset">
    </form>
    </center>
    </body>
    </html>

    after filling all fields in comment page and when i click on post button such error occurs and my error is = " Could not open socket " . can anybody help me to find out my problem, any kinds of ideas, suggestion and guidelines are welcome and i'll be greatful to get your views.

    THANK YOU IN ADVANCE

  2. #2
    Join Date
    Nov 2006
    Location
    Oakland
    Posts
    500
    My guess would be some communication problem between the server hosting your web page and the capcha server.

  3. #3
    Join Date
    Apr 2012
    Posts
    1
    I thought you have connect problem between user and software.you want further details you can visit this http://www.baalin.in

  4. #4
    Join Date
    Sep 2008
    Posts
    120
    give here the code of function recaptcha_check_answer()
    and use code quotes in the forum pls

  5. #5
    Join Date
    Apr 2012
    Location
    Denver, Colorado, USA
    Posts
    22
    Checkout w3schools for this problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles