carpcai / swoft-captcha
A captcha for swoft framework
v1.1
2018-12-04 16:07 UTC
Requires
- php: >=7.0
- ext-swoole: >=2.1
- swoft/framework: ^1.0
- swoft/session: ^1.0
This package is auto-updated.
Last update: 2025-03-05 22:04:55 UTC
README
A Captcha Library that Imitation from thinkphp Captcha developed for swoft.
Usage
Build a captcha in controller
/** * @RequestMapping("/") */ public function index(Response $response): Response { $captcha = new Captcha(); return $captcha->entry($response); }
Sample image
Check if the captcha code is correct
$captcha = new Captcha(); return $captcha->check($code);