Thursday, November 3, 2011

Captach Modules to Fight with spam

5+ Free Captcha Modules to Fight with Spam :
 A Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA) is a challenge-response integrated within the web forms to determine the user is a human or a spam bot. The CAPTCHA is used to protect a web form against illegal submissions made by a spam bots.A Spam bot is an automated scripts that generate spam content and post it everywhere they can.Usually an image is used to show some distorted text and an input field, asking user to type the challenging text what they see in the distorted text.
You can create your own CAPTCHA module or use 3rd-Party CAPTCHA module. Here we have arranged some free 3rd-Party CAPTCHA module which are so easy to use and integrate within a minute.
reCAPTCHA is a free CAPTCHA service that helps to protect a web form from spammers. reCAPTCHA improves the process by sending words that cannot be read by computers. reCAPTCHA use a private and public key and you can get it from API Signup Page. reCAPTCHA is available for different web languages such as PHP, ASP.NET, Classic ASP, Python, Perl, Java and ColdFusion etc. Here is an example about the usage of reCAPTCHA.
  
          
   
   
   


   
    require_once('recaptchalib.php');
    $publickey = "...";
    $privatekey = "...";

    # 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);
    ?>
   

   
   
 


  

No comments:

Post a Comment