After reading this post from PlanetLotus during my lunch break about captcha and the other night I was messing around on my site, which is a WordPress site written in PHP, I wanted to see how captcha like spam protection would work in PHP. There is a great article with source code over on a site called White Hat. The article does a good job showing how its done and the code is very legible. Of course this is in PHP but I think the concepts could easily be moved over to Java or another language. It also shows a nice tip on redirecting an image url to the php file so it appears as a image in the HTML to the end user (if the source was ever looked at).