php - Receiving nameserver set by passing one NS

775

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!

866

Answer

Solution:

Since PHP's DNS functions do not allow you to specify which server to query, I'd just usedig (I have no previous experience withNet_DNS_Resolver), and query specifically for the NS records:

dig ns1.sedoparking.com ns @ns1.sedoparking.com +noall +answer

Outputs:

; <<>> DiG 9.7.1-P2 <<>> ns1.sedoparking.com ns @ns1.sedoparking.com +noall +answer
;; global options: +cmd
ns1.sedoparking.com.    86400   IN  NS  ns1.sedoparking.com.
ns1.sedoparking.com.    86400   IN  NS  ns2.sedoparking.com.

However, it's somewhat rare the nameservers return NS records when you query them with their own name, so I'd just remove thens1 part from the query to make sure:

dig sedoparking.com ns @ns1.sedoparking.com +noall +answer

The answer will be the same in both cases.

People are also looking for solutions to the problem: php - Post using jQuery from Form Open Tag

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.