georgechem / captcha
验证码验证
v1.0.1
2021-10-25 18:30 UTC
Requires
- php: >=8.0.0
This package is auto-updated.
Last update: 2024-09-26 19:34:10 UTC
README
使用composer安装
composer require georgechem/captcha
使用说明: (验证码生成)
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();
使用说明: (验证码验证)
use Georgechem\Captcha\Captcha\Captcha; require __DIR__ . '/vendor/autoload.php'; $captcha = Captcha::getInstance(); // @Returns bool, true on success, false on failure $captcha->verify($text);