PHPackages                             techzolab/toolsspfcheck - 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. techzolab/toolsspfcheck

ActiveLibrary

techzolab/toolsspfcheck
=======================

Checks an IP address against a domain's SPF record

v1.0.2(3y ago)06MITPHPPHP &gt;=5.4

Since Dec 7Pushed 3y agoCompare

[ Source](https://github.com/techzolab/spf-record-check-php)[ Packagist](https://packagist.org/packages/techzolab/toolsspfcheck)[ RSS](/packages/techzolab-toolsspfcheck/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

PHP-SPF-Check
=============

[](#php-spf-check)

Simple library to check an IP address against a domain's [SPF](http://www.openspf.org/) record

Installation
------------

[](#installation)

This library is available through Composer. Run `composer require techzolab/toolsspfcheck` or add this to your composer.json:

```
{
  "require": {
    "techzolab/toolsspfcheck": "^1"
  }
}
```

Usage
-----

[](#usage)

Create a new instance of ToolsSPFCheck. The constructor requires a DNSRecordGetterInterface to be passed. Currently, you have two options:

- `DNSRecordGetter` which uses PHP's DNS functions to get data
- `DNSRecordGetterDirect` which uses the [PHP DNS Direct Query Module](https://github.com/purplepixie/phpdns) to get data.

```
