2017 © Pedro Peláez
 

library spfcheck

Checks an IP address against a domain's SPF record

image

mika56/spfcheck

Checks an IP address against a domain's SPF record

  • Sunday, February 4, 2018
  • by Mika56
  • Repository
  • 4 Watchers
  • 16 Stars
  • 26,989 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 11 Forks
  • 4 Open issues
  • 8 Versions
  • 22 % Grown

The README.md

PHP-SPF-Check

CI Latest Stable Version Total Downloads License Codacy Badge Codacy Badge, (*1)

Simple library to check an IP address against a domain's SPF record, (*2)

Requirements

This library requires a supported version of PHP, that is PHP >= 8.1., (*3)

Older versions of this library support older versions of PHP. Please note that no bugfixes, no new features, and no support will be provided for older versions., (*4)

Library version Min version of PHP Highest version of PHP
1 5.6 5.6
2 7.4 8.3
3 8.1 8.4

Installation

This library is available through Composer. Run composer require "mika56/spfcheck:^3.0" or add this to your composer.json:, (*5)

{
  "require": {
    "mika56/spfcheck": "^3.0"
  }
}

Usage

Create a new instance of SPFCheck. The constructor requires a DNSRecordGetterInterface to be passed. Included in this library is DNSRecordGetter, which uses PHP's DNS function dns_get_record to get data. Please take a look at mika56/spfcheck-dns-direct if you want to use custom DNS servers., (*6)

<?php
use Mika56\SPFCheck\DNS\DNSRecordGetter;
use Mika56\SPFCheck\SPFCheck;

require('vendor/autoload.php');

$checker = new SPFCheck(new DNSRecordGetter());
var_dump($checker->getIPStringResult('127.0.0.1', 'test.com'));

Return value is one of Result::SHORT_PASS, Result::SHORT_FAIL, Result::SHORT_SOFTFAIL, Result::SHORT_NEUTRAL, Result::SHORT_NONE, Result::SHORT_PERMERROR, Result::SHORT_TEMPERROR, (*7)

If you want to get more details about the check, you can use SPFCheck::getResult(Query $query): Result which will return a Result object with more details about the check., (*8)

The Versions

04/02 2018

dev-master

9999999-dev

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

04/02 2018

dev-issue25

dev-issue25

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

28/11 2017

1.1.2

1.1.2.0

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

31/10 2017

1.1.1

1.1.1.0

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

11/08 2017

1.1.0

1.1.0.0

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

05/01 2017

1.0.1

1.0.1.0

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

05/01 2017

dev-bugfix/4

dev-bugfix/4

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney

05/01 2017

1.0.0

1.0.0.0

Checks an IP address against a domain's SPF record

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikael Peigney