Katanius
Jun 7th 2007, 6:50 pm
Hi,
I need to make an mx request to a host sto i installed the Net_DNS package. I copy pasted this code from the developers site:
<?php
// include class file
include("Net/DNS.php");
// create object
$ndr = new Net_DNS_Resolver();
// query for IP address
$answer = $ndr->search("www.cnet.com", "MX");
// print output
$answer->answer[0]->display();
echo "<br>";
$answer->answer[1]->display();
?>
I execute it and i get the following two errors:
Notice: Trying to get property of non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsspec.php on line 13
Fatal error: Call to a member function display() on a non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsspec.php on line 13
What does this mean? How can i fix it and make it work?
I need to make an mx request to a host sto i installed the Net_DNS package. I copy pasted this code from the developers site:
<?php
// include class file
include("Net/DNS.php");
// create object
$ndr = new Net_DNS_Resolver();
// query for IP address
$answer = $ndr->search("www.cnet.com", "MX");
// print output
$answer->answer[0]->display();
echo "<br>";
$answer->answer[1]->display();
?>
I execute it and i get the following two errors:
Notice: Trying to get property of non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsspec.php on line 13
Fatal error: Call to a member function display() on a non-object in C:\Program Files\Apache Group\Apache2\htdocs\dns\dnsspec.php on line 13
What does this mean? How can i fix it and make it work?