itjackjw / hcaptcha
hyperf captcha
1.0.3
2024-06-29 07:20 UTC
Requires
- php: >=8.1
- hyperf/cache: ~3.1.0
- hyperf/di: ~3.1.0
- hyperf/event: ~3.1.0
- hyperf/framework: ~3.1.0
- hyperf/validation: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
- swoole/ide-helper: dev-master
Suggests
- ext-gd: Required to use GD
- ext-json: Required to use JSON.
- ext-openssl: Required to use HTTPS.
- ext-pdo: Required to use MySQL Client.
- ext-pdo_mysql: Required to use MySQL Client.
- ext-redis: Required to use Redis Client.
- swow/swow: Required to create swow components.
README
composer require itjackjw/hcaptcha
发布配置
php bin/hyperf.php vendor:publish itjackjw/hcaptcha
使用案例
# 创建图片验证码 $data = \itjackjw\Haptcha\captcha_create(); $key = $data['key']; # 验证码标识 $key = $data['img']; # 验证码图片 # 验证图片验证码 # $code: 用户输入的验证码 # $key: 创建验证码的时候返回的key \Ella123\Haptcha\captcha_verify($code,$key);