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); 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 { $winfo= implode($whois->Query['errstr'],"\n

"); } 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); } else $resout = ''; echo 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; } ?>