cloakings / cloakings-mrclo
Cloakings Mr.Clo Client
Installs: 2 490
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=8.3
- ext-curl: *
- cloakings/cloakings-common: ^1.1
- 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 mr-clo.com
Install
composer require cloakings/cloakings-mrclo
Usage
Basic Usage
Register at https://www.mr-clo.com:
- Look for token in dashboard page
- Create domain
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); $cloaker = \Cloakings\CloakingsMrClo\MrCloCloaker( token: $token ); $cloakerResult = $cloaker->handle($request);
Check if result mode is CloakModeEnum::Fake
or CloakModeEnum::Real
and do something with it.
If you want to render result like the original MrClo library
$baseIncludeDir = __DIR__; // change to your dir with real.php and fake.php $renderer = \Cloakings\CloakingsMrClo\MrCloRenderer(); $response = $renderer->render($cloakerResult);
You can change params creating your own MrCloParams
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); $cloaker = \Cloakings\CloakingsMrClo\MrCloCloaker( token: $token, params: \Cloakings\CloakingsMrClo\MrCloParams( source: \Cloakings\CloakingsMrClo\MrCloSourceEnum::GoogleSearch, blockIos: true, ) ); $cloakerResult = $cloaker->handle($request);
Original Logic
Original library is located at doc/original
.
License for this repository doesn't cover that code.