PHP code example of andriih / dns-service
1. Go to this page and download the library: Download andriih/dns-service 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/ */
andriih / dns-service example snippets
sh
use Andriih\Dns\DnsCheckService;
$service = new DnsCheckService();
$result = $service->getDnsRecords("gmail.com");
print_r($result);
[
["type" => "A", "name" => "gmail.com", "ttl" => "3360", "data" => "142.250.1.19"],
["type" => "TXT", "name" => "gmail.com", "ttl" => "18640", "data" => "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="],
...
];