cloakings / cloakings-magicchecker
Cloakings MagicChecker Client
Package info
github.com/cloakings/cloakings-magicchecker
pkg:composer/cloakings/cloakings-magicchecker
1.2.0
2026-05-19 10:42 UTC
Requires
- php: ^8.4
- ext-curl: *
- ext-openssl: *
- ext-sockets: *
- cloakings/cloakings-common: ^1.6
- gupalo/json: ^1.0
- psr/log: ^3.0
- symfony/http-client: ^7.4|^8.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^13.0
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.