botscout-client icon indicating copy to clipboard operation
botscout-client copied to clipboard

A PHP client library for botscout.com

PHP client for the BotScout.com API

Latest Version on Packagist Build Status SensioLabsInsight Quality Score Total Downloads

bs_logo_full

Protect your website against automated scripts using the botscout.com API.

Installation

You can install the package via composer:

composer require nicolasbeauvais/botscout-client

You also need an api key from botscout.com

Usage

You must pass a Guzzle client and an api key to the constructor of NicolasBeauvais\BotScout:

$client = new \GuzzleHttp\Client();

$botscout = new NicolasBeauvais\BotScout($client, 'api-key');

Multi

Test matches all parameters at once.

$response = $botscout->multi($name, $mail, $ip);

All

Test matches a single item against all fields in the botscout database.

$response = $botscout->all($name);
$response = $botscout->all($email);

Name

Test matches a name.

$response = $botscout->name($name);

Mail

Test matches an email.

$response = $botscout->mail($mail);

IP

Test matches an IP.

$response = $botscout->ip($ip);

Response

// Return false if the email has a match in the botscout database
$response->isValid();

// Return true if the email has a match in the botscout database
$response->getMatched();

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.