Word Verification: How to have one for your site
Introduction
You must have come across several sites where user authentication is required to differentiate robots from humans. The most popular technique used on the internet these days is the word verification. In this article Ill demonstrate in ASP how you can have one for your own site.
The basic principle this technique operates upon is very simple, generate a random string (maybe get one from a dictionary), distort it visually and display it in a manner that robots cant understand. Were going to do exactly the same except we have one problem; ASP does not have any basic image manipulation capabilities. So how are we going to accomplish this? Well have to take help of an imaging component. There are lots of commercial components available on the internet that can do this for us and much more, but we are going to use a free component called DynImage written by Chris Ashton (Thanks Chris!). This component also has many features and it will get our job done. You can get more information about this component including its documentation from the below URL:
http://www.oz.net/~cashton/dynimage.html
We already have this component installed on all our windows servers.
This is a bit lengthy tutorial, thus, I have divided it into the below seven sections:
1. Hello World!
2. Drawing the text.
3. Creating the form.
4. Specifying the string.
5. Validating users input.
6. Randomizing the string.
7. Obfuscating the string.
So lets begin!