README for the CAPTCHA class
by Pascal Rehfeldt

1.0 What is a CAPTCHA?
1.1 What are the applications for CAPTCHAs?
2.0 How to use the class?
3.0 Author
3.1 License


*** 1.0 What is a CAPTCHA?
A CAPTCHA (Completely Automated Public Turing to tell Computers from Humans Apart)
is a program that can generate and grade tests that:
- Most humans can pass.
- Current computer programs can't pass.
For example, humans can read distorted text but current
computer programs can't.

For more informations about CAPTCHAs please visit http://www.captcha.net/


*** 1.1 What are the applications for CAPTCHAs?
CAPTCHAs have several applications for practical security,
including (but not limited to):

Online Polls.
  Can the result of any online poll be trusted? Not unless the poll requires
  that only humans can vote.

Free Email Services.
  Several companies (Yahoo!, Microsoft, etc.) offer free email services.
  Most of these suffer from a specific type of attack: "bots" that sign
  up for thousands of email accounts every minute.

Search Engine Bots.
  Search engine bots, since they usually belong to large companies, respect
  web pages that don't want to allow them in. However, in order to truly
  guarantee that bots won't enter a web site, CAPTCHAs are needed.

Worms and Spam.
  CAPTCHAs also offer a plausible solution against email worms and spam:
  "I will only accept an email if I know there is a human behind the other computer."

Preventing Dictionary Attacks.
  Pinkas and Sander have suggested using CAPTCHAs to prevent dictionary attacks in
  password systems. The idea is simple: prevent a computer from being able to
  iterate through the entire space of passwords.


*** 2.0 How to use the class?
It's realy easy to use this class. At least you need only 2 lines of code to get
a CAPTCHA.

Example:

  $captcha = new captcha(5, 'jpeg', 'ASDFGHJKL');

The first parameter is the length of the string shown in the CAPTCHA, default is 6.
The second parameter is the image type of the CAPTCHA. Possible are "jpeg" and "png",
the default is "png".
At least the third parameter is the string shown in the CAPTCHA. The string get used
as you give it to the class, so be shure that is not always the same! Default is a
dynamic combination of the letters between A and Z and the numbers between 0 and 9.

All parameters have defaults so you doesn't need to enter any of the parameters:

  $captcha = new captcha();

To geht the string shown in the CAPTCHA use this:

  $CaptchaString = $captcha->GetCaptchaString();

See example.php and captcha.php for a detailed example.

That's it :)


*** 3.0 Author
Pascal Rehfeldt
Pascal@Pascal-Rehfeldt.com

http://www.phpclasses.org/browse.html/author/102754.html


*** 3.1 License
GNU General Public License (Version 2, June 1991)

This program is free software; you can redistribute
it and/or modify it under the terms of the GNU
General Public License as published by the Free
Software Foundation; either version 2 of the License,
or (at your option) any later version.

This program is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License
for more details.