PHP Classes
elePHPant
Icontem

File: examples/mxrecords.php

Recommend this page to a friend!
  Classes of Johnny Mast  >  Redbox DNS  >  examples/mxrecords.php  >  Download  
File: examples/mxrecords.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Redbox DNS
Resolve domains and get other DNS records
Author: By
Last change:
Date: 2 years ago
Size: 267 bytes
 

Contents

Class file image Download
<?php
require 'autoload.php';

$resolver = new \Redbox\DNS\Resolver();
$resolver->resolve('google.com', DNS_MX);

foreach(
$resolver as $record) {
    if (
$record['type'] === 'MX')
        echo
$record['type'] . ' ' . $record['pri'] . ' '. $record['target']."\n";
};