Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jbboehr/dnsbl.php

DNSBL Lookup
https://github.com/jbboehr/dnsbl.php

dnsbl php

Last synced: 13 days ago
JSON representation

DNSBL Lookup

Awesome Lists containing this project

README

        

# dnsbl.php

[![GitHub Build Status](https://github.com/jbboehr/dnsbl.php/workflows/ci/badge.svg)](https://github.com/jbboehr/dnsbl.php/actions?query=workflow%3Aci)

Simplified version of PEAR's Net_DNSBL with PEAR dependencies removed.

## Installation

With [composer](http://getcomposer.org)

```json
{
"require": {
"jbboehr/dnsbl": "0.1.*"
}
}
```

## Usage

```php
$dnsbl = new \DNSBL\DNSBL(array(
'blacklists' => array(
'bl.spamcop.net'
)
));
var_export($dnsbl->isListed('127.0.0.2')); echo ";\n";
var_export($dnsbl->getListingBlacklists('127.0.0.2')); echo ";\n";
```

```php
true;
array (
0 => 'bl.spamcop.net',
);
```

## License

This project is licensed under the [PHP license](http://php.net/license/3_01.txt).