eugenesh/dns-records 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-06-03