Menu

Tree [r1] /
 History

HTTPS access


File Date Author Commit
 bundled_fonts 2009-05-15 maxhemi [r1] initial import
 doc 2009-05-15 maxhemi [r1] initial import
 fonts 2009-05-15 maxhemi [r1] initial import
 sounds 2009-05-15 maxhemi [r1] initial import
 tiles 2009-05-15 maxhemi [r1] initial import
 COPYING 2009-05-15 maxhemi [r1] initial import
 README.txt 2009-05-15 maxhemi [r1] initial import
 audio.php 2009-05-15 maxhemi [r1] initial import
 config.php 2009-05-15 maxhemi [r1] initial import
 image.php 2009-05-15 maxhemi [r1] initial import
 php.ini 2009-05-15 maxhemi [r1] initial import

Read Me

Usage

Using CMS Captcha is almost as simple as copying the CMS_Captcha
directory to your web server.  I recommend changing the name of the
"CMS_Captcha" directory to something that will not be picked up by
CAPTCHA cracking utilities (ex: "vacation", or "logos").

Any page that uses this captcha simply includes an <IMG> tag pointing to
the path to "image.php" along with an <INPUT> field for users to type
their answer.  The script that handles form input reads the correct
CAPTCHA string from a session variable called "captchastring" and the
user's answer from whatever variable you use for the <INPUT> field.

example (HTML form):
<IMG SRC="vacation/image.php"><BR>
<INPUT TYPE="TEXT" NAME="color">

example (PHP handler):
session_start();
session_register('captchastring');
$captchastring=$_SESSION['captchastring'];
$userstring=$_POST['color'];
if($captchastring==$userstring)
{ /* success */ }
else
{ /* failure */ }

In the example above, I used the name "vacation" for the "CMS_Captcha"
directory and "color" for the name of the form input variable to hide
the fact that the image is a CAPTCHA and the fact that the input is
the user's answer to the CAPTCHA challenge.  This makes it difficult
for CAPTCHA cracking software to detect that the form uses a CAPTCHA.

Configuration

Several variables are configurable in the "config.php" script:
$fontsize = the font point size you wish to use
$pad = the thickness of the surrounding border
$maxrot = the maximum rotation in either direction of each character
$numchars = the number of characters in the CAPTCHA string
$validchars = the characters that may appear in the CAPTCHA string
$font = path to TTF font file, if unset, use a random font
$texttileimage = path to image for text tile, if unset, random tile
$bgtileimage = path to image for background tile, if unset, random
$outtype = output image format; png, jpeg, gif

Bundled Fonts

CMS Captcha comes with 10 bundled fonts ready to go, but there are also
some additional styles and license info in the "bundled_fonts" directory.

Font Licenses

GNU General Public License (GPL) fonts:
Hattha_Regular.ttf
Kabala.ttf
Legendum.ttf

SIL Open Font License (OFL) fonts:
AndBasR.ttf
Acknowledgement.ttf
benweiner_-_Puritan_Regular.ttf
daller_-_LCDDotMatrix5x8.ttf
Inconsolata.ttf
okolaks_gBold.ttf
rursus_-_Rursus_Compact_Mono.ttf

Bundled Tiles

CMS Captcha also comes with bundled tile textures in the "tiles"
directory.  These are all GPL images that come with the GIMP.
http://www.gimp.org/

Contributions

Being self employed, income can be sporadic.  If you find CMS
Captcha useful, you might consider sending a contribution to:

CyberMan Software
PO Box 93135
Rochester, NY 14692-8135
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.