Reputation: 35301
I'm trying to retrieve domain details of a domain I'm looking up which I purchased and pointed the nameservers to (which was done more than 72 hours ago). Now, when I'm using the dns_get_record
function to look up the details of my domain, e.g.
dns_get_record('www.mydomain.com');
dns_get_record('mydomain.com');
They both just return an empty array with no items or values in it, so I cleared my DNS cache, but this didn't seem to solve the problem. I went to http://whois.domaintools.com/
to look up on their side, I can confirm the domain has the correct nameservers pointed to, but not dns_get_record
since returning an empty array.
I tried using the dig
command and nslookup
, I cannot see the nameservers in the output.
How can I find the nameservers of a domain in PHP?
Upvotes: 1
Views: 1510
Reputation: 3974
You should wait a bit until the nw domain will propagate through your DNS. This can, in some case, take more than 72 hours.
Note: you must have a valid DN Server address configured on your host. Try with 8.8.8.8 as DNS.
Note: on Windows it will only works if you have PHP 5.3 or +
Upvotes: 1