Feeds:
Posts
Comments

Archive for the ‘ASP’ Category

Few years ago, I was looking for a simple way to embed a captcha solution on one of my sites (that was hosted on a shared IIS web-server). I looked all over for a captcha solution that won’t require installing an external DLL or connecting to a remote captcha server that will slow down the process (such as reCaptcha).

Back then I was coding in ASP3, so I decided to write my own class to do the job, and I named it “Captchavator”.

I’ve planned to release it to the public… but never did (I just forgot about it).

Last night, while I was browsing my HDD, I stumbled upon the Captchavator folder and the decided it’s time to make a move 🙂

You might say that ASP 3 is obsolete… and I’ll say “true, true…”, but since there are still many old sites out there, I think that even even if one person will find this useful, then it was worth releasing…

So what’s so special about this solution?

  • It requires your web-server to support ASP 3, Javascript and nothing more
  • Does not require installing any com/activex object on the server
  • Does not require storing images on the server
  • Developers can generate their own captcha characters using the included “painter” tool
  • Does not use any database to operate
  • Can be used with any shared hosting IIS web server

How can you use it?

The process is very simple and involves 4 simple steps…

Step 1 – Include the captcha class in your ASP page.

Step 2 – Create an instance of the Captchavatorobject

Set objCaptcha = New Captchavator

Step 3 – Generate a new captcha (pass the length of the requested captcha, in the following example, I’ve asked for a 6 chars long captcha).

objCaptcha.CreateCaptcha(6)

Step 4 – Print the captcha

objCaptcha.Print()

To validate the captcha, following these steps:

Step 1 – Include the captcha class in your ASP page.

Step 2 – Create an instance of the Captchavatorobject

Set objCaptcha = New Captchavator

Step 3 – Check if the passed POST/GET parameter matches the captcha

objCaptcha.Validate( Request(“txt1”) ) ‘will return true if validated successfully!

What’s included in the archive?

captcha.asp – This is the main Captchavator class

captcha_painter.asp – Use this file to generate your own captcha characters. Please note the painter only works with Internet Explorer (I’m too lazy to fix it to work with FF).

demo.asp – Demonstration of the complete process

I sure hope you’ll find this useful….

Try an online demo:  http://www.isralet.com/files/captcha/demo.asp

Download the Captchavator archive from here:
http://www.isralet.com/files/captcha/Captchavator v1.2 – ASP 3 Captcha.rar

Feel free to ask any questions by leaving a comment below.

Read Full Post »