Very nice.  I would suggest that you randomly stagger the vertical
location of the text to make it that much harder to OCR.

-----Original Message-----
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 12:44 PM
To: CF-Talk
Subject: I wrote a captcha generator

While working on my blog application ( www.webworksllc.com/blogcfm ) I
decided I needed some kind of captcha tool to help keep out the
spambots.  So with the help of a few java font rendering tutorials... I
wrote one, and am releasing it under the BSD open-source license.

http://www.it.dev.duke.edu/blogcfm/captcha.cfm

it's pretty basic so far, but it works.

the function generates a 6 character alphanumeric string, and then
generates a png image based on that string, and returns the image name
and an MD5 hash for the string.  You can also put the image name in the
form, which would allow you to delete it upon form submission. 
Alternatively, you could just delete the images it creates with a
scheduled task.

You include the MD5 hash as a hidden form element.

The handling form should convert the user's entry to an MD5 hash, and
then compare it to the hidden form field.  If they match, SUCCESS!


  - Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191243
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to