cloakings / cloakings-magicchecker
Cloakings MagicChecker Client
Installs: 2 446
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
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.