georgechem / captcha
Captcha verification
v1.0.1
2021-10-25 18:30 UTC
Requires
- php: >=8.0.0
This package is auto-updated.
Last update: 2024-05-26 18:45:57 UTC
README
Install with composer:
composer require georgechem/captcha
Usage: (Captcha generation)
use Georgechem\Captcha\Captcha\Captcha; require __DIR__ . '/vendor/autoload.php'; // Init session storage for Captcha - expire time can be edited (default 5 minutes) $captcha = Captcha::getInstance(); // create end echo image with captcha $captcha->create();
Usage: (Captcha verification)
use Georgechem\Captcha\Captcha\Captcha; require __DIR__ . '/vendor/autoload.php'; $captcha = Captcha::getInstance(); // @Returns bool, true on success, false on failure $captcha->verify($text);