<commit_before># Project Honeypot Http:BL Library

A simple PHP library for querying the [Project Honeypot Http:BL API](http://www.projecthoneypot.org/httpbl_api.php).

[![Build Status](https://travis-ci.org/thasmo/php.honeypot-blacklist.svg?branch=develop)](https://travis-ci.org/thasmo/php.honeypot-blacklist)
[![Coverage Status](https://coveralls.io/repos/thasmo/php.honeypot-blacklist/badge.svg)](https://coveralls.io/r/thasmo/php.honeypot-blacklist)
[![Latest Stable Version](https://poser.pugx.org/thasmo/honeypot-blacklist/v/stable)](https://packagist.org/packages/thasmo/honeypot-blacklist)

## Usage

### Create a new instance
```php
use Thasmo\ProjectHoneypot\Blacklist;
$client = new Blacklist('127.0.0.1', 'api-key');
```

### Create multiple instances
```php
use Thasmo\ProjectHoneypot\Blacklist;

# Set default API key.
Blacklist::setDefaultKey('api-key');

# Use the default API key.
$clientOne = new Blacklist('127.0.0.1');

# Use a specific API key.
$clientTwo = new Blacklist('127.0.0.2', 'other-api-key');

# Use the default API key, again.
$clientThree = new Blacklist('127.0.0.3');
```

### Check for various types of clients
```php
# Client is a search engine.<commit_msg>Set correct URL for the test coverage badge<commit_after># Project Honeypot Http:BL Library

A simple PHP library for querying the [Project Honeypot Http:BL API](http://www.projecthoneypot.org/httpbl_api.php).

[![Build Status](https://travis-ci.org/thasmo/php.honeypot-blacklist.svg?branch=develop)](https://travis-ci.org/thasmo/php.honeypot-blacklist)
[![Coverage Status](https://coveralls.io/repos/thasmo/php.honeypot-blacklist/badge.svg?branch=develop)](https://coveralls.io/r/thasmo/php.honeypot-blacklist?branch=develop)
[![Latest Stable Version](https://poser.pugx.org/thasmo/honeypot-blacklist/v/stable)](https://packagist.org/packages/thasmo/honeypot-blacklist)

## Usage

### Create a new instance
```php
use Thasmo\ProjectHoneypot\Blacklist;
$client = new Blacklist('127.0.0.1', 'api-key');
```

### Create multiple instances
```php
use Thasmo\ProjectHoneypot\Blacklist;

# Set default API key.
Blacklist::setDefaultKey('api-key');

# Use the default API key.
$clientOne = new Blacklist('127.0.0.1');

# Use a specific API key.
$clientTwo = new Blacklist('127.0.0.2', 'other-api-key');

# Use the default API key, again.
$clientThree = new Blacklist('127.0.0.3');
```

### Check for various types of clients
```php
# Client is a search engine.
{'fraction_non_alphanumeric': 0.16830065359477125, 'fraction_numerical': 0.0196078431372549, 'mean_word_length': 5.279487179487179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '546381', 'n_tokens_mistral': 928, 'n_tokens_neox': 862, 'n_words': 174}