php - Receiving nameserver set by passing one NS
Is there a way to recieve the complete nameserver set by passing just one nameserver of the set?
For example I pass the the Nameserver: ns1.sedoparking.com and as a result I would expect
ns1.sedoparking.com + ns2.sedoparking.com
I tried it already with the Pear function "Net_DNS_Resolver", DIG anddns_get_record("ns1.sedoparking.com", DNS_ANY, $authns, $addtl)
But I receive always the wrong nameservers.
Thank you a lot!
Answer
Solution:
Since PHP's DNS functions do not allow you to specify which server to query, I'd just use
dig
(I have no previous experience withNet_DNS_Resolver
), and query specifically for the NS records:Outputs:
However, it's somewhat rare the nameservers return NS records when you query them with their own name, so I'd just remove the
ns1
part from the query to make sure:The answer will be the same in both cases.