Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
771 views
in Technique[技术] by (71.8m points)

php - dns_get_record query failed

I was trying to create a DNS availability checker, and while testing dns_get_record(), some of the results failed.

My code is something like this:

$result = dns_get_record("pitottube.com", DNS_ANY);
print_r($result);

Normally, it is supposed to return something in an array (if it's available), or an empty array (if it's not) -- but if I put "pitottube.com", it gives a warning like this:

Warning: dns_get_record() [function.dns-get-record]: DNS Query failed

Can you help with this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It looks like the specified "official" dns servers for that domain are offline. A whois on the domain gives:

Record expires on 12-Apr-2012.
Record created on 13-Apr-1998.
Database last updated on 25-Jan-2012 13:20:24 EST.

Domain servers in listed order:

NS1.DONGMUN.NET              147.46.147.28
NS2.DONGMUN.NET              147.46.147.29

and directly querying either of the specified name servers returns failure - they're not pingable either, so there's no official DNS servers available to respond to queries on that domain. Hence your error.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...