项目作者: daniesy

项目描述 :
Fetch DNS Resource Records associated with a hostname
高级语言: PHP
项目地址: git://github.com/daniesy/php-digger.git
创建时间: 2019-08-09T13:24:49Z
项目社区:https://github.com/daniesy/php-digger

开源协议:GNU General Public License v3.0

下载


DIGGER Build Status

A simple way to fetch DNS Resource Records associated with a hostname.

How to

Using digger is easy as 1, 2, 3.

  1. <?php
  2. require 'vendor/autoload.php';
  3. use Daniesy\Digger;
  4. $records = (new Digger)->getRecords('ping-pong.dev', 'A');
  5. foreach($records as $record) {
  6. var_dump($record);
  7. }
  8. if($records->has('127.0.0.1')) {
  9. echo "The dns record is set";
  10. }

Installation

You can install Digger with composer by running the following command.

composer require daniesy/php-digger:dev-master

Parameters

  • host
    The host you want to fetch the DNS records from
  • type
    The type of DNS Records you want to get. At the moment, only the following records are supported: A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, TXT. I’ll add more at a later point.
  • timeout
    The timeout in seconds after which the call should fail. The default timeout is 5 seconds.