capictcha
Project Page

MAIN DOCS DOWNLOAD

capictcha is a CAPTCHA image generator.

CAPTCHAs are tests to determine whether the viewer is human or machine. Usually, they generate a random string of characters, display them in a graphic, and ask the user to enter them as text. The more random factors in the graphic (e.g. color, character positions, font size, etc.) the harder it is to read the text. The advantage is that the difficulty involved in reading the text climbs much faster for machines than it does for humans.

The current capictcha is pretty hard for anyone to read, and that's on purpose. However, it's very adjustable. If you use it on your site, play with the settings. The most dramatic of the constants to adjust for readability are MAX_OVERSTRIKES and CONTRAST_MULTIPLIER. Note that this paragraph is pretty much all the extrasource documentation I have right now. The code speaks for itself pretty well if you're the type that's going to be using it.

One more note until I can get actual docs out: I've tested capictcha, at least casually in passing, on the following two server configurations:
apache 1.3.31 / php 4.3.8 / gd 2.0 (with freetype)
apache 1.3.23 / php 4.1.2 / gd 1.6.2 (with freetype)
If you have it running on something else, I'm interested in hearing about it.

Note that capictcha is an example of a visual CAPTCHA. I don't have the skills to write non-visual CAPTCHAs (e.g. a sound-based CAPTCHA to support blind users).

I made it because I am trying to limit the exposure of my real, personal email address on Internet. In theory, doing so should cut down on the amount of spam I receive.

Googling my way around with this in mind, I found that most of the hits came from the archives of a mailing list that I used to participate in. I also used to help maintain the project website.

I contacted the webmaster with a small shell script that would obfuscate my email address in those archives using strictly text methods, and he replied with a link to a tarball containing the archives of that mailing list.

"I'll do it if you do the work," he said cheerfully. "Bonus if you end up with scripts to do scrubbing easily."

I hadn't programmed in years, and it looked like time to get back into it.

I like UNIX environments. I like the maturity of the little tools, and I like the fact that there are thousands of little tools. When I log into a UNIX system, I know that I'll never have to write a text pager or editor, because I know that less and vim have my ass covered.

capictcha is my humble attempt at the same thing. A little, relatively trivial tool that can fit well with the other little tools.