Wednesday, April 08, 2009

Build Spam control functionality to your site using Captchas

Do you own a website? Are you working on a website?? Do you want to make your website spam free? If any of the answers of the above is true you may consider using a captcha service which is open source.

We use captcha when we want to avoid unnecessary requests to the server through the web forms open to the users which can send any data to the server. There are too many scripts, programs which are popularly known as automated bots that can send thousands and millions of unwanted data to the server using those forms.

In order to avoid those forms being utilized by these bots you need to build some validation before the form's data is posted to the server. So the application knows that the this data which is being sent to server is sent by a human and not a bot!!

To do this you can put some images which are being displayed to the users randomly each time the form page is accessed. In these images you need to show some alphanumeric characters and ask the user to type it down in the text placed adjacent to this captcha code. If the data entered by the users is correct based on the captcha then you can be sure that this is a human and not a bot as a program will not be able to make out the numbers displayed in the image.


Try to build this and you could be caught in a heavy duty task.

Now, the Carnegie Mellon University comes with a service "reCaptcha" which enables the the developers to implement this services by simple modification in the code provided in context to your application's technology asp.net, php, java, perl etc.

Each time a user comes to fill up the form he will type the captcha and your code in your web page will connect to the reCaptcha server which will in turn validate the user's authenticity.

Check this out at www.recaptcha.net

No comments: