tppCaptcha

Get It Now Only $20!
License Agreement


tppCaptcha is an ASCII-art, non-graphical CAPTCHA system that works with PHP versions 4 and 5, does not require any image processing libraries and is very easy to integrate with your existing web site.

It does an excellent job of keeping nasty automated web bots from abusing your web site forms - blocking contact form spam, guestbook spam, and comment spam. It helps block all forms of automated website spam!

Website spam is a serious, growing problem. However, we feel it is a problem you can handle with a carefully considered CAPTCHA solution such as tppCaptcha. I also offer custom installation services. Get It Now Only $20!
License Agreement
tppCaptcha v1.0 - 10/19/2006

Documentation


Defines
  • tppCaptchaUseSession
  • tppCaptchaClutterPercent
  • tppCaptchaClutterString
  • tppCaptchaLetterSpacing
  • tppCaptchaLength

Yellow values represent default values

tppCaptchaUseSession
defaults to: false

When this is set to true: tppCaptcha uses sessions to store a secure value of the original code. The original code is never stored in the session. The only way to validate the user supplied code with the original displayed code is by using tppCaptchaVerify(); The code is stored in the $_SESSION superglobal after it has been run through a secure hash algorithm (sha1) as well as additional encodings to further obfuscate the code. Remember values stored in $_SESSION are never available to the browser unless you echo them.

However, even if you happen to make the contents of your session visible, the value for tppCaptcha will still be of no use since the original code is not available - only the secure hash.

When this is set to false: instead of using sessions to store the secure hash of the code, we simply insert a hidden form field onto the form as part of the tppCaptchaFormField() function call. Again, all the considerations of the $_SESSION storage are the same, and in this case we actually are making the contents of the secure hash available. It doesn't matter! Hashes are one way mathematical formulas, and the original value is impossible to derive from the data - it is mathematically impossible to decrypt the hash back to its original value.

What this means to you is that even if a bot has this hash, they are unable to use it to break tppCaptcha.


tppCaptchaClutterPercent
defaults to: 55%

Just like picture-based CAPTCHAs use background clutter, tppCaptcha does this too. The higher this number, the more clutter you'll see in the CAPTCHA. This clutter will help keep bots from being able to figure out the CAPTCHA code by looking at the design of the large ASCII letters.


tppCaptchaClutterString
defaults to: . > , < / \ | - _ + = / \ \ # *

The characters that are picked randomly to create the clutter. The closer to the actual characters in the font you choose, the more effective at blocking bots.


tppCaptchaLetterSpacing
defaults to: 3

The number of spaces between letters.


tppCaptchaLength
defaults to: 4

The number of characters to generate for the CAPTCHA code.


Functions

  • tppCaptchaStart
  • tppCaptchaGenerate
  • tppCaptchaVerify
  • tppCaptchaFormField
  • tppCaptchaHiddenFormField

function tppCaptchaStart( )
Call tppCaptchaStart() before calling any of the other tppCaptcha functions.


string function tppCaptchaGenerate( $fontFile] )
$fontFile is optional - it defaults to 'default'. Supply a different name for $fontFile to use a different font. tppCaptcha ships with 8 fonts. 'default', 'big', 'hash', 'future', 'giant', reverse', 'roman', 'tinker'.

This function returns a string containing the CAPTCHA display value. This may be placed inside any HTML element, but the font used to display it must be a fixed-width font. A <pre> tag is an easy way to display the CAPTCHA.
The example uses something similar to <pre style="font-size: 6pt;">


bool function tppCaptchaVerify( [$userInput], [$hashData] )
$userInput and $hashData are both optional - they are intelligently detected either from the $_REQUEST superglobal or from $_SESSION depending on the value of the defined value of tppCaptchaUseSession

This function will return true when the user supplied code matches, and false when it does not.


function tppCaptchaFormField( [$fieldExtras] )
$fieldExtras is optional
This function will output the html for a form field. This field is XHTML compatible. To add additional values to the field such as id or class, simply format a string like you want it to appear and pass it to the function for $fieldExtras, it will be output inside the field tag.

This function will also output a hidden XHTML compliant form field with the secure hash when tppCaptchaUseSessions is undefined or is defined as false. You can create your own user input form field named 'tppCaptchaUserData' and then call the function tppCaptchaHiddenFormField() in lieu of using this function.


function tppCaptchaHiddenFormField( )
This function will output the html for a form field. This field is XHTML compatible. This function is used to output a hidden XHTML compliant form field with the secure hash when tppCaptchaUseSessions is undefined or is defined as false. This should only be called if you are not using function tppCaptchaFormField().
This only needs to be called if tppCaptchaUseSessions is undefined, or is defined as false.


Creating New Fonts

New fonts are simple to create, just put letters in a text file with at least one empty line between letters. Letters A-Z and numbers 0-9 are supported. Lower case letters are not. Characters should appear in the file in that same order too. A-Z 0-9. Remember to make your letter O's and your zeros look different.


Regular Price: $25 - On Sale for only $20! The price will go up soon, so don't delay, buy it today!

For web site hosting I recommend - www.bluehost.com