{"repo":"spatie/dns","free":true,"listed":false,"github":"https://github.com/spatie/dns","clone":"git clone https://github.com/spatie/dns.git","description":"Retrieve DNS records","language":"PHP","stars":610,"topics":["php","dns","hacktoberfest"],"license":"MIT","category":"networking-infra","readme_excerpt":"Retrieve DNS records This package contains a class that can fetch DNS records. You can use various methods to retrieve info of a record. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation If you do not have dig installed you will need it. You can install the package via composer: Usage The class can get these record types: A , AAAA , CNAME , NS , PTR , SOA , MX , SRV , TXT , DNSKEY , CAA , NAPTR . getRecords will return an array with objects that implement the Spatie\\Dns\\Records\\Record interface. Working with DNS records Here's how you can fetch the first A-record of a domain. These methods can be called on all records: - host() : returns the host ( spatie.be ) - ttl() : return the time to live ( 900 ) - class() : returns the class ( IN ) - type() : returns the type ( A ) When converting a record to a string you'll get a string with all info separated with tabs. Some records have additional methods available. For example, records of type A have an additional ip() method. To know which extra methods there are, check the docblocks above all record classes in the source code. Using a specific nameserver You can get records from a specific nameserver. S","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/dns/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}