Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenjis/ci3-like-captcha
CodeIgniter3-like Captcha
https://github.com/kenjis/ci3-like-captcha
captcha codeigniter codeigniter4
Last synced: 3 months ago
JSON representation
CodeIgniter3-like Captcha
- Host: GitHub
- URL: https://github.com/kenjis/ci3-like-captcha
- Owner: kenjis
- License: mit
- Created: 2021-02-02T06:36:38.000Z (almost 4 years ago)
- Default Branch: 1.x
- Last Pushed: 2022-10-05T07:22:31.000Z (over 2 years ago)
- Last Synced: 2024-10-01T05:42:33.997Z (3 months ago)
- Topics: captcha, codeigniter, codeigniter4
- Language: PHP
- Homepage:
- Size: 131 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeIgniter3-like Captcha
This project provides CodeIgniter3-like Captcha.
- This is **not** 100% compatible with CI3's CAPTCHA Helper.
- This uses [php-simple-captcha](https://codeberg.org/S1SYPHOS/php-simple-captcha).## Requirements
- PHP 7.4 or later
## Installation
```sh-session
$ composer require kenjis/ci3-like-captcha
```## Usage
See .
Instead of `create_captcha()`, use `Captcha::createCaptcha()`.
```php
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`](LICENSE).