2017 © Pedro Peláez
 

library bot-detect

Bot detector library

image

vipx/bot-detect

Bot detector library

  • Tuesday, October 24, 2017
  • by lennerd
  • Repository
  • 4 Watchers
  • 41 Stars
  • 115,385 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 16 Forks
  • 2 Open issues
  • 19 Versions
  • 6 % Grown

The README.md

VipxBotDetect

This library helps you detecting bots like Google, Yahoo or Bing., (*1)

Tests Coverage Status, (*2)

Installation using composer

``` bash $ php composer.phar require vipx/bot-detect, (*3)

## Usage

``` php
use Vipx\BotDetect\BotDetector;
use Symfony\Component\Config\FileLocator;
use Vipx\BotDetect\Metadata\Loader\YamlFileLoader;

# Instantiate Symfony components required to load and parse YAML files.
$locator = new FileLocator();
$loader = new YamlFileLoader($locator);

# Use extended bot list prodivded in Resources directory.
$metadataFile = './Resources/metadata/extended.yml';

# Instantiate a BotDetector with the YamlFileLoader instance and path to YAML.
$detector = new BotDetector($loader, $metadataFile);

# Call detect() on BotDetector, passing in a user agent string and IP address,
# most commonly found in $_SERVER['HTTP_USER_AGENT'] and $_SERVER['REMOTE_ADDR']
# respectively.
# detect() will return a Vipx\BotDetect\Metadata\Metadata object containing the
# details of a matched bot and null on no match.
$bot = $detector->detect($agent, $ip);

Note: To greatly improve performance, BotDetector has a built in cache, which can be used to speed up parsing and loading of metadata., (*4)

``` php, (*5)

Instantiate a BotDetector with additional options.

$detector = new BotDetector($loader, $metadataFile, [ 'debug' => $debug, 'cache_dir' => '/acme/cache', ]); ```, (*6)

Via additional options metadata_cache_file and metadata_dumper_class you can further control how cache files are named or generated., (*7)

ToDo's

  • Add additional meta data loaders (xml, php)
  • Replace static fixtures with dynamically added data for example from an external archive with some kind of public API or other repository e.g. on Github or Bitbucket

Credits

The first version of list of bots is coming from Manage_Bots script created by the phpBB community. The following community members and contributors worked on the script and its list of bots:, (*8)

phpBB Community

Marcus Wendel, ReptileGuy, Young Jedi Knight, Pony99CA, Clava, ricjonhay, roBBx, Sr X, HGN, AmigoJack, millipede, maxwell2, StandBy, ade74, heredia21, TheSnake, natalia26, Puchahawa, T50, Peter77sx, Schwpz, Vinny, lanesharon, leschek, fac7orx, Joshua203, Paul, doktornotor, stokerpiller and raimon, (*9)

Contributors

COil, jdeniau, rubenrua, smilesrg, jbboehr, (*10)

If you find one or more missing bots, simple fork this repository and add them to the fitting metadata files., (*11)

The Versions

24/10 2017

dev-master

9999999-dev http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

24/10 2017

v2.0.1

2.0.1.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

23/10 2017

v2.0.0

2.0.0.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

06/01 2017

v1.2.6

1.2.6.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

22/04 2016

v1.2.4

1.2.4.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

05/02 2016

v1.2.3

1.2.3.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

24/01 2016

v1.2.2

1.2.2.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

13/01 2016

v1.2.1

1.2.1.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

08/12 2015

v1.2.0

1.2.0.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

05/10 2015

v1.1.5

1.1.5.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

13/06 2015

v1.1.4

1.1.4.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

11/06 2015

v1.1.3

1.1.3.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

07/06 2015

v1.1.2

1.1.2.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

30/05 2015

v1.1.1

1.1.1.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

13/10 2014

v1.1.0

1.1.0.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lennart Hildebrandt

bot

09/10 2014

v1.0.3

1.0.3.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

by Lennart Hildebrandt

bot

25/04 2014

v1.0.2

1.0.2.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

by Lennart Hildebrandt

bot

25/04 2013

v1.0.1

1.0.1.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

by Lennart Hildebrandt

bot

25/03 2013

v1.0.0

1.0.0.0 http://lennerd.com/

Bot detector library

  Sources   Download

MIT

The Requires

 

by Lennart Hildebrandt

bot