|
| | Net_Whois::query() -- does a whois query Description
Executes a Whois query on a server
Return value
string - the data from the Whois request.
Throws
Table 31-1. Possible PEAR_Error values | Error code | Error message | Reason | Solution |
|---|
| every |
"
Error connecting to server
(Net_Socket says: Error-Message.)
"
|
Connection to server failed
|
Check typing of server address and make sure the host is
connected to the network.
|
Note:
You will not get a PEAR_Error, if
the query fails due to a not existing whois object. This can be
only done by checking the data returned by query().
NoteThis function can be called
statically. ExampleExample 31-1. Using Whois-query() <?php
require_once "Net/Whois.php";
$server = "whois.denic.de";
$query = "phpcrawler.de"; // get information about
// this domain
$data = Net_Whois::query($query, $server);
echo $data;
?> |
|
| |
|