beastphp/easy-geetest
EasyGeetest PHP SDK for integrating Geetest CAPTCHA with modern PHP (>=7.1). Composer-ready, namespaced wrapper based on the official SDK. Instantiate with captcha_id/private_key and call successValidate with challenge/validate/seccode plus optional user/client/ip info.
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",
]
);
How can I help you explore Laravel packages today?