I\'m playing with DNS record lookup in PHP and am running into something confusing. I\'ve looked up 2 different domains each using different hosts and different authoritati
I think I've figured out why. I believe this has to do with "Zone Transfers" per this thread Is it possible to find all DNS subdomains for a given domain name?.
What I expect is the same functionality from the CNAME lookup as A, NS, MX--EVERYTHING ELSE. (Hardly an unrealistic expectation...)
dns_get_record("domain.com", DNS_CNAME, $authns_cname, $addtl_cname);
I expect to get back an array populated with all the CNAMES set up for domain.com. That's not what happens.
I suppose I just had to phrase the question right (15th permutation found that promising answer). I assume both name servers (Dreamhost and my company's) are "protected" against this. Though it seems to me not to be terribly sensitive information in comparison to the rest of the DNS records.
$www = dns_get_record("www.microsoft.com", DNS_CNAME);
//print_r($www);
//echo $www[0]['target'];
while ($www[0]['target']) {
echo "<br/>-- ".$www[0]['target'];
$www = dns_get_record($www[0]['target'], DNS_CNAME);
}