Hi DCs,
i was in need to protect a submission page of one of my projects with a captcha. So i searched for a good, easy to use, mighty, customizable and free class. I kissed a lot of frogs until i found my prince. I told Mouser in the IRC channel that i now found a very good one (IMHO). I'd better resisted to tell him, because now he urged me to write this post to annoy you all and share my experience with it.
OK, as Mouser is root, his wish is my command
And as the forum search don't showed up a mention of my finding yet, i'm now sitting here and typing. *sigh*
Well i lastly landed and went with SecurImage (
http://www.phpcaptcha.org/)
SecurImage sample from my page:
Note:
This captcha is a very easy to solve one. But the "security level" is freely adjustable with every aspect of imagesize, font-facetype, count of distortion lines, amount of text distortion (twisting), text-angle, background color, text-color (even multicolor text is possible), background-image, and, and, and. Also the given audio files for playback are automatically distorted randomly every time they are played back by the class itself, so no need to fiddle around with any audio editor to get them distorted manually and end up with statically distorted audios only.
What is Securimage?
Securimage is an open-source free PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse. It can be easily added into existing forms on your website to provide protection from spam bots. It can run on most any webserver as long as you have PHP installed, and GD support within PHP. Securimage does everything from generating the CAPTCHA images to validating the typed code. Audible codes can be streamed to the browser with Flash for the vision impaired.
Features
* Show an image in just 3 lines of code
* Validate submitted entries in less than 6 lines of code
* Customizable code length
* Customizable character sets, Unicode support
* TTF font support
* Use custom GD fonts when TTF is not available
* Easily add background images
* Multi colored, distorted, and transparent text options
* Customizable Flash button to stream MP3 audio of CAPTCHA code
* Ability to use a word list
I must say, the package worked right out of the box nicely. Configuration took me only 10 minutes. The longest time i spent on designing my form, which you are totally free to design. No restrictions from the captcha class here.
As this was my very first fiddling with graphics in PHP i was at first a bit concerned about the GD library support requirement. I was not sure if this will work on my webspace (is it installed or not). But calm down...after a quick research i noticed that GD library is implemented in PHP for a long time by default. So if your webhoster haven't explicitly disabled GD library in his PHP installation, this class will work without any prerequisite add-on or installation of any 3rd party stuff except the files that come with the SecurImage package.
I was also capable to add full multilanguage support. Even with multilanguage audio for the visual impaired ones (DE and EN at the moment).
Well i must admit, that i ran into a problem with my german audiofiles. They won't play more than one character of the code, while the english ones, that ship with SecurImage worked well and read all characters of the code in a row. Therefore i contacted the author and got a reply within some hours with a very competent and helpful hint.
For the files (maybe helpful for others that run into this problem as well): The important thing is, that the mp3 audiofiles
must not have any ID3 tag in it. The author gave me the right direction and also a (new to me) nice mp3-Tag commandline utility to get rid of the tags in my files. And...tadaaa...after that it worked in multilanguage audio without any further change in the configuration or my code.
Finally i just recommend this class highly to all who search a free, easy to use, customizable captcha class with a kind and responsive author for their PHP projects.
HTH anyone
Greetings
JoTo
PS:
As this class is open source and totally free, i think i don't have to claim that i'm not affiliated with the SecurImage project in any way. I get nothing from the author for this recommendation. I haven't found a "Donate" button on the project page yet, even if i'd gladly sent the author some bucks for his effort. I am just a very satisfied user of the class and glad that such a good piece of software is free available. That's all!