Advertisement

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

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.

[php]
<html>
<body>
<form action="" method="post">
<?php

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);
?>
<br/>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
[/php]

Akismet

Automattic Kismet (Akismet) is a spam filtering service that filter link spam. This filter use those spam rules which are captured on all participating blogs. Akismet use an WordPress API key and you can get it from WordPress API Page.

[php]
$WordPressAPIKey = ‘aoeu1aoue’;
$MyBlogURL = ‘http://www.example.com/blog/’;
$akismet = new Akismet($MyBlogURL ,$WordPressAPIKey);
$akismet->setCommentAuthor($name);
$akismet->setCommentAuthorEmail($email);
$akismet->setCommentAuthorURL($url);
$akismet->setCommentContent($comment);
$akismet->setPermalink(‘http://www.example.com/blog/alex/someurl/’);
if($akismet->isCommentSpam())
//store the comment but mark it as spam (in case of a mis-diagnosis)
else
// store the comment normally
[/php]

Defensio

Defensio is another spam filter service that filter spam as well as eliminates malware and other unwanted or risky content to fully protect your Web 2.0 application or blog.

Mollom

Mollom is a web service that helps you stop spam on your blog, community website or social network as well as identify content quality. Here is an example that shows how to integrate this service.

[php]
<?php
// require Mollom-class
require_once ‘path/to/mollom.php’;

// set keys
Mollom::setPublicKey(‘<your-public-key>’);
Mollom::setPrivateKey(‘<your-private-key>’);

// populate serverlist (get them from your db, or file, or …
Mollom::setServerList($servers);

// execute the method
try
{
if(Mollom::checkCaptcha($mollomSessionId, $answerFromVisitor)) echo ‘the answer is correct, you may proceed!’;
else echo ‘incorrect!’;
}
catch (Exception $e)
{
// your errorhandling goes here
}

?>
[/php]

opencaptcha

Basic installation is just cut and paste. New fonts, image algorithms, and distortions applied weekly. Here is an example that shows how to integrate this service.

[php]
<?
if($_GET[‘opencaptcha’]==’failed’) { echo "<script>alert(‘You Did Not Fill In The Security Code Correctly’);</script>";}
$date = date("Ymd");
$rand = rand(0,9999999999999);
$height = "80";
$width = "240";
$img = "$date$rand-$height-$width.jpgx";
echo "<input type=’hidden’ name=’img’ value=’$img’>";
echo "<a href=’http://www.opencaptcha.com’><img src=’http://www.opencaptcha.com/img/$img’ height=’$height’ alt=’captcha’ width=’$width’

border=’0′ /></a><br />";
echo "<input type=text name=code value=’Enter The Code’ size=’35’ />";
?>
[/php]

Processing Page

[php]
<?
if(file_get_contents("http://www.opencaptcha.com/validate.php?ans=".$_POST[‘code’]."&img=".$_POST[‘img’])==’pass’) {
// CONTINUE LOGIN
} else {
header("LOCATION: ".$_SERVER[‘HTTP_REFERER’]."?opencaptcha=failed");
}
?>
[/php]

ironclad captcha

ironclad-captcha is the free Professional 3D objects based CAPTCHA Service for your site. The integration of this CAPTCHA Service is very easy for your existing PHP or ASP.NET application.

Previous articleWordPress 3.0 RC3 (Release Candidate 3) Available for Download
Next articleWordPress 3.0 “Thelonious” released

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here