Dead simple way to create captcha for your site
This project provides a demo of generating and using a simple Captcha. generate captcha w/o external dependencies, plain simple PHP
simply copy paste captcha.php, see the demo.
// see the example index.php on how to integrate this to your site
<?php
include_once('./captcha.php');
// Start the session
session_start();
$captcha2 = new Captcha();
$_SESSION['captcha2'] = $captcha2->generateAlphaNumericChallenge();
$captcha2->generateImage();
?>
- clone this repo. go to the cloned directory
- type
php -S localhost:8000
in your terminal - open your browser, go to localhost:8000
testing this requires phpunit. just run composer update
composer update
- 0.2.1
- CHANGE: Update docs (module code remains unchanged)
- 0.2.0
- ADD: Add
generateAlphaNumericChallenge()
to generate alphanumeric random values
- ADD: Add
- 0.1.1
- FIX: invalid width for generated 5 digit random value
- 0.1.0
- The first proper release
- CHANGE: created CaptchaTest.php to test the functionalities using phpunit.
- 0.0.1
- Work in progress
Roy Cyril Dosado – @keyboardcaper – rcdosado@gmail.com
Distributed under the XYZ license. See LICENSE
for more information.