2017 © Pedro Peláez
 

library captcha

Easy way to create and validate captchas.

image

kareem3d/captcha

Easy way to create and validate captchas.

  • Friday, July 19, 2013
  • by kareem3d
  • Repository
  • 0 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Captcha

An easy class to create and validate captcha images, (*1)

Usage Example

Create a new file which can be accessed through url and add these few lines, (*2)

e.g. request_captcha.php => http://www.example.com/php_scripts/request_captcha.php, (*3)

use Captcha\Captcha;

spl_autoload_register();

session_start();

Captcha::init('{path to any font you want on your server}');

$captcha = new Captcha(130, 60, 5);

$captcha->generateImage();

$captcha->saveSession();

Now to generate image in the view, (*4)

<img src="http://www.example.com/php_scripts/request_captcha.php" />

Last step: validating user input with the last generated captcha, (*5)

session_start();

if(Captcha::validate( $userInput ))
{
    // User input validated successfully.
}

The Versions

19/07 2013

dev-master

9999999-dev

Easy way to create and validate captchas.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by Kareem Mohamed