romeoz / rock-captcha
Captcha library
0.11.0
2015-11-11 05:11 UTC
Requires
- php: >=5.4.0
- romeoz/rock-base: 0.12.*
Requires (Dev)
- dapphp/securimage: 3.6.*
- gregwar/captcha: 1.*
- phpunit/phpunit: ^4.7.0
- romeoz/rock-session: 0.12.*
Suggests
- dapphp/securimage: required for using SecurimageCaptcha (https://github.com/dapphp/securimage)
- gregwar/captcha: required for using GregwarCaptcha (https://github.com/Gregwar/Captcha)
- romeoz/rock-session: required for write code to session
This package is not auto-updated.
Last update: 2024-10-26 18:59:56 UTC
README
Features
- Multi providers
- Write code to session
- Standalone module/component for Rock Framework
Installation
From the Command Line:
composer require romeoz/rock-captcha
In your composer.json:
{ "require": { "romeoz/rock-captcha": "*" } }
Quick Start
use rock\captcha\KCaptcha; $captcha = new KCaptcha(); echo '<img src="' . $captcha->getDataUri() . '">'; $captcha->getCode(); // output: <code>
Write to session:
Required install Rock Session.
composer require romeoz/rock-session
Example:
$config = [ 'session' => new \rock\session\Session ]; $captcha = new KCaptcha($config); echo '<img src="' . $captcha->getDataUri() . '">'; $captcha->getSession(); // output: <code>
Requirements
- PHP 5.4+
- For write code to session required Rock Session:
composer require romeoz/rock-session
- For using GregwarCaptcha required gregwar/captcha:
composer require gregwar/captcha:1.*
- For using SecurimageCaptcha required dapphp/securimage:
composer require dapphp/securimage:3.6.*
All unbolded dependencies is optional.
License
Captcha library is open-sourced software licensed under the MIT license.