carpcai / swoft-captcha
A captcha for swoft framework
Installs: 109
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/carpcai/swoft-captcha
Requires
- php: >=7.0
- ext-swoole: >=2.1
- swoft/framework: ^1.0
- swoft/session: ^1.0
This package is auto-updated.
Last update: 2025-10-05 23:22:44 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);