kenjis / ci3-like-captcha
CodeIgniter3-like Captcha
Installs: 5 470
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- s1syphos/php-simple-captcha: ^2.2.2
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.4
- phpunit/phpunit: ^9.5
README
This project provides CodeIgniter3-like Captcha.
- This is not 100% compatible with CI3's CAPTCHA Helper.
- This uses php-simple-captcha.
Requirements
- PHP 7.4 or later
Installation
$ composer require kenjis/ci3-like-captcha
Usage
See https://codeigniter.com/userguide3/helpers/captcha_helper.html.
Instead of create_captcha()
, use Captcha::createCaptcha()
.
use Kenjis\CI3Like\Captcha\Captcha; $vals = [ 'word' => random_string('numeric', 4), 'img_path' => FCPATH . 'captcha/', 'img_url' => base_url() . '/captcha/', ]; $cap = Captcha::createCaptcha($vals); $data = [ 'captcha_id' => '', 'captcha_time' => $cap['time'], 'word' => $cap['word'], ];
License
This package is licensed using the MIT License.
Please have a look at LICENSE
.