Say for example I want to use
dns_get_record("domain", DNS_ALL);
Is it possible to use that to use an external dns lookup, I'm looking for something like this:
dns_get_record("sitetolookup.com","sitetouseforlookup.com", DNS_ALL);
Is there anything in PHP that allows that?
There is a PEAR package that will do it.
//
// create new resolver object, passing in an array of name
// servers to use for lookups
//
$r = new Net_DNS2_Resolver(array('nameservers' => array('192.168.0.1')));
//
// execute the query request for the google.com MX servers
//
try {
$result = $r->query('google.com', 'MX');
} catch(Net_DNS2_Exception $e) {
echo "::query() failed: ", $e->getMessage(), "
";
}