beastphp / easy-geetest
The easiest way to use geetest.
1.0.0
2018-09-06 03:22 UTC
Requires
- php: >=7.1
- ext-json: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- mockery/mockery: 1.0.x-dev
- phpunit/phpunit: ^5.6
This package is not auto-updated.
Last update: 2024-11-10 05:19:38 UTC
README
easy-geetest
项目介绍
easy极验 PHP SDK 由于官方PHP SDK年代久远 不支持Namespace、Composer,于是在官方基础上制作了Easy极验PHP SDK
环境需求
1.PHP >= 7.1
安装
composer require beastphp/easy-geetest
使用说明
use Beast\EasyGeetest\EasyGeetest;
$geetest = new EasyGeetest([
'captcha_id' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'private_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);
//验证结果
$geetest->successValidate(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|xxxxxx',
[
"user_id" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"client_type" => "web",
"ip_address" => "127.0.0.1",
]
);
参与贡献
- Fork 本项目
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request