deep_whois = false;
// To use special whois servers (see README)
//$whois->UseServer('uk','whois.nic.uk:1043?{hname} {ip} {query}');
//$whois->UseServer('au','whois-check.ausregistry.net.au');
// uncomment the following line to add support for non ICANN tld's
// $whois->non_icann = true;
$result = $whois->Lookup($query);
$resout = str_replace('{query}', $query, $resout);
$winfo = '';
switch ($output)
{
case 'object':
if ($whois->Query['status'] < 0)
{
$winfo = implode($whois->Query['errstr'],"\n
");
}
else
{
$utils = new utils;
$winfo = $utils->showObject($result);
}
break;
case 'nice':
if (!empty($result['rawdata']))
{
$utils = new utils;
$winfo = $utils->showHTML($result);
}
else
{
if (isset($whois->Query['errstr']))
$winfo = implode($whois->Query['errstr'],"\n
");
else
$winfo = 'Unexpected error';
}
break;
case 'proxy':
if ($allowproxy)
exit(serialize($result));
default:
if(!empty($result['rawdata']))
{
$winfo .= '
'.implode($result['rawdata'],"\n").''; } else { $winfo = implode($whois->Query['errstr'],"\n