2017 © Pedro Peláez
 

library dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

image

frankvanhest/dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

  • Thursday, July 5, 2018
  • by FrankVanHest
  • Repository
  • 0 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

DNS Lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver., (*1)

Install

Simple, just use composer, (*2)

composer require frankvanhest/dns-lookup

Usage

For a DNS lookup without a specific nameserver:, (*3)

$dnsLookup = new \FrankVanHest\DnsLookup\DnsLookup('domain.com');

For a DNS lookup with a specific nameserver:, (*4)

$dnsLookup = new \FrankVanHest\DnsLookup\DnsLookup('domain.com', '8.8.8.8'); // An IP or domain is allowed

Get all available records, (*5)

/** @var \FrankVanHest\DnsLookup\DnsRecord $dnsRecord */
foreach ($dnsLookup->getAllRecords() as $dnsRecord) {
    echo $dnsRecord->getName();
    echo $dnsRecord->getType();
    echo $dnsRecord->getValue();
    echo $dnsRecord->getTtl();
    echo $dnsRecord->getPrio();
}

Get all available records of a specific type, (*6)

/** @var \FrankVanHest\DnsLookup\DnsRecord $dnsRecord */
foreach ($dnsLookup->getRecordsByType('A') as $dnsRecord) {
    echo $dnsRecord->getName();
    echo $dnsRecord->getType();
    echo $dnsRecord->getValue();
    echo $dnsRecord->getTtl();
    echo $dnsRecord->getPrio();
}

Contribution

If you have any contribution for this project feel free to submit a pull request., (*7)

License

See License, (*8)

The Versions

05/07 2018

dev-master

9999999-dev https://github.com/frankvanhest/dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Frank van Hest

resolver dns

05/07 2018

v0.2.0

0.2.0.0 https://github.com/frankvanhest/dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Frank van Hest

resolver dns

20/06 2018

v0.1.1

0.1.1.0 https://github.com/frankvanhest/dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

  Sources   Download

MIT

The Requires

  • php ^7.2

 

The Development Requires

by Frank van Hest

resolver dns

20/06 2018

v0.1.0

0.1.0.0 https://github.com/frankvanhest/dns-lookup

Simple library to retrieve DNS records with default OS resolver or specific nameserver

  Sources   Download

MIT

The Requires

  • php ^7.2

 

The Development Requires

by Frank van Hest

resolver dns