Adding CAPTCHA (or similar) to ISAPI dll in Delphi 2007

Hello,
I am tasked with creating a public website with a security check (image validation) on the very first page to restrict spam bots access. I am using Delphi 2007 with IW9.0.30 to create a ISAPI dll (as I like iSAPI better than CGIs but am open right now). I have everything done except the validation part because this is the first time I am working with JavaScript inside ISAPI. I found JCap (http://www.archreality.com/jcap/ - based on the CAPTCHA engine - http://www.captcha.net/) ) to be easier to follow and would like to use it instead of CAPTCHA itself. Has anyone done something similar to this/used Captcha/reCaptcha with ISAPI before? If not, would you happen to know of some resources/documentation/samples that can help me out?  Would it be easier to code for the check as a CGI than ISAPI?

We need this done fast and would appreciate any info that can help me out.

Thanks a lot.
VJ
vrijeshAsked:
Who is Participating?
 
developmentguruConnect With a Mentor PresidentCommented:
 I am making some assumptions here... What you need to do is generate an image that you can display on your page to have the user enter the text shown in the... somewhat distorted image.

  You can have any software generate that image (your choice, you could even do it yourself).  The generated image should be stored in a directory that is accessible to your page.  In the OnLoad of your page I would call the software to generate the image.  This should not only generate the image, but also let you know what the correct text match is.  Given the dynamic nature of the web page you should be able to dynamically generate the IMG html to point to your image.  The only part left then would be to authenticate on the button click.  You can use a Button and put code behind it to do the validation.  If it is correct you can do a response.redirect to move onto the next page, or a repsonse.redirect to make it reload the page with a new image.

  So...

1) generate image and matching text in OnLoad
2) dynamically generate IMG html to point to generated image location
3) validate

Let me know if you need more.
0
 
vrijeshAuthor Commented:
Thank you developmentguru. Yes this is what I need to do. While I was thinking about it in terms of "plugging" something in, the way you laid it out so clearly gives me some new ideas to try. I do have a set of 50 or so images already created which I could use like you mentioned. Only thing remaining is to dyamically pull up the image and validate it on the button click.

Thanks once again. Will post what I come up with soon.
0
 
vrijeshAuthor Commented:
Thank you developmentguru. A look from the outside was just what I needed. When I was done, there was really nothing much to it. And the folks love having something built in-house. Thanks once again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.