ankur0101 Posted February 16, 2012 Share Posted February 16, 2012 Hi, I have a domain called domain-whois-lookup.com It is having 6 NS records, you can verify that at domaintools.com/domain-whois-lookup.com I have a following code : <?php $result = dns_get_record("domain-whois-lookup.com", DNS_NS); echo count($result); echo "<p></p>"; print_r ($result['0']); echo "<p>================</p>"; for($i=0; $i<=count($result); $i++) { // @print_r ($result["$i"]); @$target_ns = $result["$i"]; echo "<p></p>"; print_r ($target_ns["target"]); echo "<p></p>"; } ?> After executing this, it shows only 4 records instead of 6, why ? One more thing is many times, first name server (e.g. ns1) shows as 2nd and 2nd NS as first, why ? Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/ Share on other sites More sharing options...
requinix Posted February 16, 2012 Share Posted February 16, 2012 Doing a lookup from home only shows me the four awsdns nameservers - not six. Non-authoritative answer: domain-whois-lookup.com nameserver = ns-146.awsdns-18.com domain-whois-lookup.com nameserver = ns-778.awsdns-33.net domain-whois-lookup.com nameserver = ns-1523.awsdns-62.org domain-whois-lookup.com nameserver = ns-1613.awsdns-09.co.uk domain-whois-lookup.com primary name server = ns-1613.awsdns-09.co.uk responsible mail addr = awsdns-hostmaster.amazon.com serial = 1 refresh = 7200 (2 hours) retry = 900 (15 mins) expire = 1209600 (14 days) default TTL = 86400 (1 day) domain-whois-lookup.com internet address = 204.197.241.82 Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318041 Share on other sites More sharing options...
ankur0101 Posted February 16, 2012 Author Share Posted February 16, 2012 At my domain registrar, I have kept 6. I know. How following sites are showing 6 ? http://who.is/whois/domain-whois-lookup.com/ http://whois.domaintools.com/domain-whois-lookup.com Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318042 Share on other sites More sharing options...
ankur0101 Posted February 16, 2012 Author Share Posted February 16, 2012 Even domain registrar's WHOIS is showing 6 records : https://manage.name.com/whois_result?type=domain&domain_name=domain-whois-lookup.com&submit=Whois+Search Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318043 Share on other sites More sharing options...
requinix Posted February 16, 2012 Share Posted February 16, 2012 Well, a second lookup gives me Non-authoritative answer: domain-whois-lookup.com MX preference = 0, mail exchanger = domain-whois-lookup.com domain-whois-lookup.com primary name server = ns1.linkwayhosting.com responsible mail addr = webmaster.linkwayhosting.com serial = 2012020501 refresh = 86400 (1 day) retry = 7200 (2 hours) expire = 3600000 (41 days 16 hours) default TTL = 86400 (1 day) domain-whois-lookup.com nameserver = ns1.linkwayhosting.com domain-whois-lookup.com nameserver = ns2.linkwayhosting.com domain-whois-lookup.com internet address = 204.197.241.82 It alternates between the two every time. I don't know enough about the system to tell you why it's doing that or how to tell that it does. Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318047 Share on other sites More sharing options...
ankur0101 Posted February 16, 2012 Author Share Posted February 16, 2012 So now what to do to get right result ? Is this kind of BUG ? How other given domain lookup sites are showing 6 ? Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318048 Share on other sites More sharing options...
requinix Posted February 16, 2012 Share Posted February 16, 2012 How other given domain lookup sites are showing 6 ? Because they know something we don't: that there are two different lookup results, for whatever reason, and can gather the results from both into one report. Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318069 Share on other sites More sharing options...
ankur0101 Posted February 16, 2012 Author Share Posted February 16, 2012 Because they know something we don't: that there are two different lookup results, for whatever reason, and can gather the results from both into one report. I dont think so. They must have discovered this problem while development of their sites. I think they are using some perl script. But question remains as it is, why ? why PHP is not able to get real result ? Link to comment https://forums.phpfreaks.com/topic/257114-problem-with-dns_get_record-shows-only-4-name-servers/#findComment-1318120 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.