Skip to content

pfkdata/PHP-DNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Using the PHP-DNS class

<?php $Hostname = new DNS("example.com"); ?>

Retrieve the domainname:

  <?php echo $Hostname->get_hostname(); ?>

Retrieve all the DNS records:

  <?php print_r($Hostname->get_records()); ?>

Only retrive the 'A' records from the DNS server:

  <?php print_r($Hostname->get_records('A')); ?>

Retrieve only the 'A' and 'MX' records from the DNS server:

  <?php print_r($Hostname->get_records('A', 'MX')); ?>

About

A simple PHP class to retrieve DNS records

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages