Parent Name Servers

I tried to figure out how to determine which parent name server is associated with a domain name. For example, when searching for a domain name using intoDNS, it displays the results for both normal and parent name servers. They mention what a parent name server is, for example:

k.gtld-servers.net was kind enough to provide us with this information.

But how did they find out that they had to query this particular name server? A few examples of what the parent name server is:

stackoverflow.com   k.gtld-servers.net
google.com          c.gtld-servers.net
ycombinator.com     a.gtld-servers.net
asp.net             g.gtld-servers.net
google.nl           sns-pb.isc.org
google.de           z.nic.de

It seems that all common TLDs can be requested in a specific subdomain gtld-servers.net.

Right now, I find the “normal” name servers in PHP as follows:

$nameservers = dns_get_record($domain_name, DNS_NS);

, , , , PHP?


Update

, UNIX nslookup . , , PHP dns_get_record, , http://www.iana.org/domains/root/db, , onDNS, .

, , exec() nslookup. - dns_get_record, ?

+5
2

, . NET_DNS2 PEAR , , DNS- . , nickc:

http://www.iana.org/domains/root/db

( , , , )

require 'Net/DNS2.php';

$server = gethostbyname('j.gtld-servers.net'); // 192.48.79.30

$r = new Net_DNS2_Resolver(array('nameservers' => array($server)));
$result = $r->query('stackoverflow.com', 'NS');

print_r ($result);

:

...
    [authority] => Array
        (
            [0] => Net_DNS2_RR_NS Object
                (
                    [nsdname] => ns1.webfaction.com
                    [name] => webassay.com
                    [type] => NS
                    [class] => IN
                    [ttl] => 172800
                    [rdlength] => 17
                    [rdata] => ns1webfaction 
                )

            [1] => Net_DNS2_RR_NS Object
                (
                    [nsdname] => ns2.webfaction.com
                    [name] => webassay.com
                    [type] => NS
                    [class] => IN
                    [ttl] => 172800
                    [rdlength] => 6
                    [rdata] => ns2 .
                )

            [2] => Net_DNS2_RR_NS Object
                (
                    [nsdname] => ns3.webfaction.com
                    [name] => webassay.com
                    [type] => NS
                    [class] => IN
                    [ttl] => 172800
                    [rdlength] => 6
                    [rdata] => ns3 .
                )

        )
...

, : http://www.intodns.com/stackoverflow.com

+2

- , "NS". / / , , .

, , : http://www.iana.org/domains/root/db

0

All Articles