PHPackages                             clash82/cachedhttpbl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. clash82/cachedhttpbl

ActiveLibrary[Security](/categories/security)

clash82/cachedhttpbl
====================

Cached http:BL is a PHP &gt;=8.3 library that allows to check IPv4 address with `Project HoneyPot's http:BL service` to determine if it's located on the blacklist.

v4.2.0(1y ago)2241.3k1GPL-3.0-or-laterPHPPHP &gt;=8.3.0CI passing

Since Aug 4Pushed 1y ago3 watchersCompare

[ Source](https://github.com/clash82/CachedHttpBl)[ Packagist](https://packagist.org/packages/clash82/cachedhttpbl)[ Docs](https://github.com/clash82/cachedhttpbl)[ RSS](/packages/clash82-cachedhttpbl/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (6)Used By (0)

Cached http:BL PHP library
==========================

[](#cached-httpbl-php-library)

[![phpunit](https://github.com/clash82/CachedHttpBl/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/phpunit.yaml/badge.svg)[![phpcs](https://github.com/clash82/CachedHttpBl/actions/workflows/phpcs.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/phpcs.yaml/badge.svg)[![php-cs-fixer](https://github.com/clash82/CachedHttpBl/actions/workflows/php-cs-fixer.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/php-cs-fixer.yaml/badge.svg)[![phpstan](https://github.com/clash82/CachedHttpBl/actions/workflows/phpstan.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/phpstan.yaml/badge.svg)[![phpmd](https://github.com/clash82/CachedHttpBl/actions/workflows/phpmd.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/phpmd.yaml/badge.svg)[![rector](https://github.com/clash82/CachedHttpBl/actions/workflows/rector.yaml/badge.svg)](https://github.com/clash82/CachedHttpBl/actions/workflows/rector.yaml/badge.svg)

Author: [Rafał Toborek](https://kontakt.toborek.info)

Cached http:BL is a PHP (&gt;= v8.3) library that allows you to check an IPv4 address using `Project HoneyPot's http:BL service` to determine whether it is listed on the blacklist.

*Note: If you still need to support PHP 5.x or PHP &lt; 7.2, install version 2.x. For PHP &gt;= 7.2, install version 3.x.*

Why use the http:BL service?
----------------------------

[](#why-use-the-httpbl-service)

Http:BL provides data about the IP addresses of visitors to your website. The data is exchanged via the DNS system. You can query DNS server and receive a response indicating the type of visitor to your site, the level of threat they pose, and how long it has been since they were last seen within the Project Honey Pot trap network.

More details on how the service works can be found on [the official webpage](https://www.projecthoneypot.org/httpbl.php).

Why use the Cached http:BL library?
-----------------------------------

[](#why-use-the-cached-httpbl-library)

One of the biggest advantages of using the CachedHttpBL library is the ability to cache http:BL responses using cache adapters. You can use one of the available cache adapters (CSV, Memory, BlackHole) or create a new one by implementing a dedicated cache interface. The library is built in an elegant, object-oriented style, allowing you to extend its functionality.

Try it!
-------

[](#try-it)

Stable version:

```
composer require clash82/cachedhttpbl:4.*
```

Here is an example (CLI script) of how to use library with CSV cache adapter:

```
