ackintosh / captcha
This package is abandoned and no longer maintained.
No replacement package was suggested.
simple Captcha maker.
dev-master
2013-07-21 01:41 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2022-04-16 04:25:54 UTC
README
#Captcha for php
This is Captcha library for php.
##Installation
composer.json
{
"require": {
"ackintosh/captcha": "dev-master"
}
}
$ php composer.phar install
#Usage ###Output a default Captcha image
<?php require_once 'vendor/autoload.php'; use Ackintosh\Captcha; use Ackintosh\CaptchaConfig; $cap = new Captcha(CaptchaConfig::instance()); $cap->output();
###With settings We can override setting.
<?php $config = array( 'type' => 'jpeg', 'width' => 200, 'height' => 100, 'seeds' => 'ABCDEFG1234567', 'stringLength' =>10, ); $cap = new Captcha(CaptchaConfig::instance($config)); $cap->output();
###Validate
<?php require_once 'vendor/autoload.php'; if (Ackintosh\Captcha::isValidCode($_POST['code'])) echo 'ok'; else echo 'ng';
#Requirements
- PHP 5.3 or greater
- GD
- FreeType
#Thanks
- IPAex Fonts (http://ipafont.ipa.go.jp/)