onliner / geetest-php-sdk
PHP client for GeeTest captcha.
Installs: 267
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/onliner/geetest-php-sdk
Requires
- php: ^7.2
- ext-json: *
Requires (Dev)
- phpstan/phpstan: ^0.12.14
- phpunit/phpunit: ^8.5|^9.0
This package is auto-updated.
Last update: 2025-09-14 21:26:00 UTC
README
This is a PHP library that wraps up the server-side verification step required to process responses from the GeeTest service.
Installation
The preferred way to install this extension is through composer.
Either run
composer require onliner/geetest-php-sdk:^1.0
or add this code line to the require
section of your composer.json
file:
"onliner/geetest-php-sdk": "^1.0"
Usage
Step 1. Register captcha request.
const ID = '58f984fb3d1f7f4732a74b3cda273eed'; const KEY = '58f984fb3d1f7f4732a74b3cda273eed'; $geetest = new GeeTest(ID, KEY); $register = $geetest->register()->toArray();
Step 2. Normal mode of captcha validation.
$geetest = new GeeTest(ID, KEY); $geetest->validate($challenge, $validate, $seccode, true);
Step 2. Fallback mode of captcha validation.
$geetest = new GeeTest(ID, KEY); $geetest->validate($challenge, $validate, $seccode, false);
License
Released under the MIT license.