承接 gurkanbicer/getdns 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gurkanbicer/getdns

最新稳定版本:v1.1.0

Composer 安装命令:

composer create-project gurkanbicer/getdns

包简介

GetDNS is a parser for dig command results.

README 文档

README

"GetDNS"

GetDNS

GetDNS is a parser for the dig command results. This package includes features for querying DNS records by using random public dns servers and for querying domain nameservers.

Example usage:

use Gurkanbicer\Getdns\Getdns;
use Gurkanbicer\Getdns\Exceptions\EmptyResponseException;
use Gurkanbicer\Getdns\Exceptions\InvalidDomainException;
use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Exception\ProcessFailedException;

$getdns = new Getdns();

try {
    $getdns->setDomain("grkn.co");
    $aRecords = $getdns->queryDns("A");
    var_dump($aRecords);

    $domainNameservers = $getdns->queryDomainNameservers();
    var_dump($domainNameservers);
} catch (ProcessFailedException) {
    echo "The process has been failed.";
} catch (ProcessTimedOutException) {
    echo "The process has been timed out.";
}

Example output:

array(5) {
  ["status"]=>
  string(7) "NOERROR"
  ["data"]=>
  array(2) {
    [0]=>
    string(12) "188.114.97.3"
    [1]=>
    string(12) "188.114.96.3"
  }
  ["query"]=>
  string(1) "A"
  ["nameserver"]=>
  string(7) "9.9.9.9"
  ["command"]=>
  string(65) "dig +nocmd +noall +multiline +answer +comments grkn.co A @9.9.9.9"
}

Installation

You can install it via Composer: composer require gurkanbicer/getdns

Requirements

  • PHP >= 8.0.2
  • The dig command should be run on your server, otherwise you should install the package (for installation: https://command-not-found.com/dig)
  • Your php environment shouldn't be disable proc_open function and other functions that starts with proc_*

Supported DNS Types

  • NS
  • SOA
  • A
  • AAAA
  • CNAME
  • MX
  • TXT
  • SRV
  • Actual domain nameservers (that the onwer pointed)

Donations

If you wanna support me you can

"Buy Me A Coffee"

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-09-09