Detect if user is bot or real user using magicchecker.com
composer require cloakings/cloakings-magicchecker
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 library is located at doc/original
.
License for this repository doesn't cover that code.