PHP Captcha for FutureMe

Posted: January 6th, 2007 | Author: | Filed under: FutureMe, hacks while the baby sleeps | View Comments

 In the continuing attempt to make myself useful during my long winter break from school, I wrote a php CAPTCHA implementation for FutureMe. There are a bunch out there, but I just didn’t think any of them were easy ennough to implement and/or stylish enough to deserve to be on FutureMe. It’s also a little startling how many of the implementations use a hidden input field to pass through the key in the form. That’s about 1.2% more secure that having no CAPTCHA at all. It’s maybe even less secure because it’s just so tempting to break.

My implementation uses the built-in php session object to store the captcha value (I know – I should use mysql…but we’re not looking at > 1 server in the near future). I also limited the possible characters significantly to try and cut down on ambiguity. And I dynamically shift the placement of the letters on the image with a certain window. I would have liked to introduce some element of rotation as well, but was too lazy to figure out how to do it w/ the PHP imageobject.

Anyways, I think it’s pretty slick if I do say so myself. If you’re interested in it, lemme know.


blog comments powered by Disqus