Closed ProgrammerNomad closed 8 years ago
Hello,
Getting a CNAME record is just like getting any other record:
$r = new Net_DNS2_Resolver(array('nameservers' => array('8.8.8.8')));
try {
$result = $r->query('ftp.mrhost.ca', 'CNAME');
foreach($result->answer as $rr)
{
printf("ftp.mrhost.ca -> %s\n", $rr->cname);
}
} catch(Net_DNS2_Exception $e) {
echo "::query() failed: ", $e->getMessage(), "\n";
}
This would output:
ftp.mrhost.ca -> ftp.rr.mrhost.ca
Mike
Hello,
I am using netdns2 in all other records working fine but i dont know who to get CNAME records of domain.
Please provide me any example. it will be very help full for my project.