I implemented something similar for a client (in ColdFusion of all
things) - except we chose to go with a simple arithmetic problem
before accepting the submission. I just had the system generate two
random numbers (between 1 and 10, but you could higher I guess), then
hash the correct answer and put it in a hidden field. Then when the
user entered hits submit, the script takes the user's answer, hashes
it with the same key and compares it to the hash of the correct
answer, to see if the user was correct.
So far the the client hasn't had any problems with it. The key that
the correct answer is hashed with changes daily (somehow based on
date, don't recall exactly), and I suppose a spammer could break the
system if they tried hard enough, but hopefully it has made it hard
enough that it's not worth their time.
Plus, this is more accessible than an image-based captcha.
- Aric
---
www.NEXCESS.NET - Shared/Reseller Hosting
www.EliteRax.com - Dedicated Servers, Server Clusters
www.MaxVPS.com - Virtual Private Servers
- Great prices, Great service - check us out!
On Mar 18, 8:46 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> newbiegalore wrote:
> > One solution could be that I generate 10K gifs using Imagemagick (text->
> > image) etc. and then the cgi randomly calls up one of these images
> > and checks if the user entered the right letters which would be the name
> > of the image. But surely there must be a better solution!
>
> Why not generate the image on the fly? ImageMagick is pretty quick, with
> good Perl bindings.
>
> --
> Toby A Inkster BSc (Hons) ARCS
> [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
> [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 14:31.]
>
> The Semantic Web
> http://tobyinkster.co.uk/blog/2008/03/09/sw/