deep_whois = empty($_GET['fast']); // 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'); // Comment the following line to disable 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

"); } } $resout = str_replace('{result}', $winfo, $resout); $out = str_replace('{ver}', $whois->CODE_VERSION, $out); } else { $resout = ''; $out = str_replace('{ver}', '', $out); } exit(str_replace('{results}', $resout, $out)); //------------------------------------------------------------------------- function extract_block (&$plantilla,$mark,$retmark='') { $start = strpos($plantilla,''); $final = strpos($plantilla,''); if ($start === false || $final === false) return; $ini = $start+7+strlen($mark); $ret=substr($plantilla,$ini,$final-$ini); $final+=8+strlen($mark); if ($retmark===false) $plantilla=substr($plantilla,0,$start).substr($plantilla,$final); else { if ($retmark=='') $retmark=$mark; $plantilla=substr($plantilla,0,$start).'{'.$retmark.'}'.substr($plantilla,$final); } return $ret; }