Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $file = fopen("/var/www/html/tools/domains.txt", "r");
- $i = 0;
- while (!feof($file)) {
- $members[] = fgets($file);
- }
- fclose($file);
- foreach ($members as $x){
- // echo $x .'<br>';
- $key = 'target';
- $NS=array('8.8.8.8');
- $dns_NS_array=dns_get_record(". $x . ", DNS_NS, $NS);
- //print_r($dns_NS_array);
- print_r($dns_NS_array[$key]);
- }
- //single domain check
- //$result = dns_get_record("mt.net");
- //print_r($result);
- //echo '<br/>';
- //results
- //Array ( [0] => Array (
- //[host] => mt.net
- //[class] => IN [ttl] => 59
- // [type] => SOA [mname] => lewis.mt.net [rname] => admin.lewis.mt.net [serial] => 2016110805 [refresh] => 1800 [retry] => 600 [expire] => 604800 [minimum-ttl] => 86400 ) [1] => Array (
- //[host] => mt.net
- // [class] => IN [ttl] => 59
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //THIS IS THE ENTRY I WANT TO RETURN FOR EACH DOMAIN IN THE ARRAY //[type] => NS [target] => clark.mt.net ) [2] => Array (
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //[host] => mt.net [class] => IN
- // [ttl] => 59 [type] => NS
- //[target] => lewis.mt.net ) [3] => Array (
- //[host] => mt.net
- //[class] => IN
- // [ttl] => 59
- //[type] => A [ip] => 192.168.5.10 ) [4] => Array (
- // [host] => mt.net
- //[class] => IN [ttl] => 59
- //[type] => MX [pri] => 10
- // [target] => mail.bluetie.com ) [5] => Array (
- //[host] => mt.net
- //[class] => IN
- //[ttl] => 59
- //[type] => TXT
- //[txt] => v=spf1 mx ip4:206.127.64.128/26 ip4:205.201.128.0/20 ip4:198.2.128.0/18 include:spf.bluetie.com -all [entries] => Array ( [0] => v=spf1 mx ip4:206.127.64.128/26 ip4:205.201.128.0/20 ip4:198.2.128.0/18 include:spf.bluetie.com $
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement