cloakings / cloakings-magicchecker
Cloakings MagicChecker Client
Package info
github.com/cloakings/cloakings-magicchecker
pkg:composer/cloakings/cloakings-magicchecker
1.1.1
2024-06-26 15:57 UTC
Requires
- php: >=8.3
- ext-curl: *
- ext-openssl: *
- ext-sockets: *
- cloakings/cloakings-common: ^1.4
- gupalo/json: ^1.0
- psr/log: ^3.0
- symfony/http-client: ^7.1
Requires (Dev)
- phpunit/phpunit: ^10.5
README
Detect if user is bot or real user using magicchecker.com
Install
composer require cloakings/cloakings-magicchecker
Usage
Basic Usage
Register at https://magicchecker.com/:
- Create campaign
- set "Safe Page" containing "fake" or "safe" like http://example.com/real.php (IMPORTANT!)
- set "Promo Page" containing "real" or "money" like http://example.com/fake.php (IMPORTANT!)
- Download file (index.php)
- Get params from the file: CAMPAIGN_ID
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); $cloaker = \Cloakings\CloakingsMagicChecker\MagicCheckerCloaker( campaignId: $campaignId ); $cloakerResult = $cloaker->handle($request);
Check if result mode is CloakModeEnum::Fake or CloakModeEnum::Real and do something with it.
Original Logic
Original library is located at doc/original.
License for this repository doesn't cover that code.