-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtest.php
More file actions
19 lines (18 loc) · 785 Bytes
/
Copy pathtest.php
File metadata and controls
19 lines (18 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
require('autoload.php');
$dns = new Metaregistrar\DNS\dnsProtocol();
$dns->setServer('ns1.google.com');
$result = $dns->Query('metaregistrar.com','SRV');
/* @var $result Metaregistrar\DNS\dnsResponse */
foreach ($result->getResourceResults() as $resource) {
var_dump($resource);
if ($resource instanceof Metaregistrar\DNS\dnsAresult) {
echo $resource->getDomain().' - '.$resource->getIpv4().' - '.$resource->getTtl()."\n";
}
if ($resource instanceof Metaregistrar\DNS\dnsAAAAresult) {
echo $resource->getDomain().' - '.$resource->getIpv6().' - '.$resource->getTtl()."\n";
}
if ($resource instanceof Metaregistrar\DNS\dnsTXTresult) {
echo $resource->getDomain().' - '.$resource->getRecord().' - '.$resource->getTtl()."\n";
}
}