PHP code example of alyakin / dns-checker

1. Go to this page and download the library: Download alyakin/dns-checker 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/ */

    

alyakin / dns-checker example snippets


use Alyakin\DnsChecker\Facades\DnsChecker;

$records = DnsChecker::getRecords('example.com', 'A');

use Alyakin\DnsChecker\DnsLookupService;

$dns = new DnsLookupService([
    'servers' => ['8.8.8.8', '1.1.1.1'],
    'timeout' => 2,
    'fallback_to_system' => true,
]);

$records = $dns->getRecords('example.com', 'MX');
bash
php artisan vendor:publish --tag=dns-checker-config