I'm developing a web form that's going to be public and with the rash of form spam I've seen on other public forms, I'd like to include a security code to validate that it is not a bot sending in the script. I could probably develop my own with imagemagick and php, but I'm wondering if anybody doesn't have a link out there to an existing script that will handle this for me and works well.
Well, you could do something like : <? sessionstart(); $validate = mt_rand(0,100); session_register("validate"); ?> And then print out $validate later and compare that to a posted value. Not such a bad idea, except any automated bot could read the value since you printed it.
To get started this is ok. But as nevetS said, a smart bot could read the random number and beat your security system. An image would be much more difficult to read by the bot. I am also using http://www.cocoavillagepublishing.com/development/tools/php/scripts/