PHP code example of techzolab / toolsspfcheck
1. Go to this page and download the library: Download techzolab/toolsspfcheck library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
techzolab / toolsspfcheck example snippets
use Nzldev\ToolsSPFCheck\ToolsSPFCheck;
use Nzldev\ToolsSPFCheck\DNSRecordGetter;
d for lookup.
var_dump($checker->isIPAllowed('127.0.0.1', 'test.com'));
// or
$checker = new ToolsSPFCheck(new DNSRecordGetterDirect("8.8.8.8")); // Uses phpdns, allowing you to set the nameserver you wish to use for the dns queries.
var_dump($checker->isIPAllowed('127.0.0.1', 'test.com'));