eugenesh/dns-records
Composer 安装命令:
composer require eugenesh/dns-records
包简介
A simple PHP library that allows you to get all DNS records for a specified domain name.
README 文档
README
A simple PHP library that allows you to get all DNS records for a specified domain name.
Usage Guide
Installation Guide
To install with Composer:
composer require eugenesh/dns-records
Usage Guide
Below is an example script to get all DNS records for the domain "gmail.com"
// A simple example require("vendor/autoload.php"); use DnsRecords\RecordHandler; $recordHandler = new RecordHandler(); // Domain Name $domainName = "gmail.com"; // Record Type $recordsType = "ALL"; // Get all DNS records $records = $recordHandler->getDnsRecords($domainName, $recordsType); //Print Result echo '<pre style="border: 1px solid red; padding: 35px; width: 75%; margin: 20px auto; display: block;">'; var_dump( $records ); echo '</pre>';
As a result, you should get something like this:
array (size=16) 0 => array (size=5) 'host' => string 'gmail.com' (length=9) 'class' => string 'IN' (length=2) 'ttl' => int 81 'type' => string 'A' (length=1) 'ip' => string '142.250.181.229' (length=15) 1 => array (size=5) 'host' => string 'gmail.com' (length=9) 'class' => string 'IN' (length=2) 'ttl' => int 6685 'type' => string 'NS' (length=2) 'target' => string 'ns1.google.com' (length=14) 2 => array (size=5) 'host' => string 'gmail.com' (length=9) 'class' => string 'IN' (length=2) 'ttl' => int 6685 'type' => string 'NS' (length=2) 'target' => string 'ns4.google.com' (length=14) 3 => array (size=5) 'host' => string 'gmail.com' (length=9) 'class' => string 'IN' (length=2) 'ttl' => int 6685 'type' => string 'NS' (length=2) 'target' => string 'ns2.google.com' (length=14) ....
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-06-03