ç
added optional suport for non ICANN tld's
This commit is contained in:
parent
1c956eb328
commit
32de0d6ac4
4 changed files with 113 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
2006/03/29 David Saez <david@ols.es>
|
||||
- fixed bad rwhois server/port detection
|
||||
- added optional suport for non ICANN tld's
|
||||
|
||||
2006/03/24 David Saez <david@ols.es>
|
||||
- added handler for NAMESDIRECT
|
||||
|
|
|
@ -56,6 +56,9 @@ if(isSet($_GET['query']))
|
|||
//$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);
|
||||
echo "<blockquote><b>Results for $query :</b><br></br>";
|
||||
|
||||
|
|
|
@ -38,6 +38,9 @@ class Whois extends WhoisClient
|
|||
// Recursion allowed ?
|
||||
var $gtld_recurse = true;
|
||||
|
||||
// Support for non-ICANN tld's
|
||||
var $non_icann = false;
|
||||
|
||||
// Network Solutions registry server
|
||||
var $NSI_REGISTRY = "whois.nsiregistry.net";
|
||||
|
||||
|
@ -118,15 +121,20 @@ class Whois extends WhoisClient
|
|||
|
||||
// Search the correct whois server
|
||||
|
||||
if ($this->non_icann)
|
||||
$special_tlds = array_merge($this->WHOIS_SPECIAL,$this->WHOIS_NON_ICANN);
|
||||
else
|
||||
$special_tlds = $this->WHOIS_SPECIAL;
|
||||
|
||||
foreach($tldtests as $tld)
|
||||
{
|
||||
// Test if we know in advance that no whois server is
|
||||
// available for this domain and that we can get the
|
||||
// data via http or whois request
|
||||
|
||||
if (isset($this->WHOIS_SPECIAL[$tld]))
|
||||
if (isset($special_tlds[$tld]))
|
||||
{
|
||||
$val = $this->WHOIS_SPECIAL[$tld];
|
||||
$val = $special_tlds[$tld];
|
||||
$domain = substr($query, 0, - strlen($tld) - 1);
|
||||
$val = str_replace('{domain}', $domain, $val);
|
||||
$server = str_replace('{tld}', $tld, $val);
|
||||
|
|
|
@ -119,4 +119,103 @@ $this->WHOIS_SPECIAL = array(
|
|||
'za.org' => 'whois.za.net'
|
||||
);
|
||||
|
||||
/* Non ICANN TLD's */
|
||||
|
||||
$this->WHOIS_NON_ICANN = array (
|
||||
'agent' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'agente' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'america' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'amor' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'amore' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'amour' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'arte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'artes' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'arts' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'asta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'auction' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'auktion' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'boutique' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'chat' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'chiesa' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'church' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'cia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'ciao' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'cie' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'club' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'clube' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'com2' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'deporte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'ditta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'earth' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'eglise' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'enchere' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'escola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'escuela' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'esporte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'etc' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'famiglia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'familia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'familie' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'family' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'free' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'hola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'game' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'ges' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'gmbh' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'golf' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'gratis' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'gratuit' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'iglesia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'igreja' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'inc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'jeu' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'jogo' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'juego' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'kids' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'kirche' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'krunst' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'law' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'legge' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'lei' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'leilao' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'ley' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'liebe' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'lion' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'llc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'llp' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'loi' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'loja' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'love' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'ltd' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'makler' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'med' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'mp3' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'not' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'online' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'recht' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'reise' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'resto' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'school' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'schule' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'scifi' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'scuola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'shop' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'soc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'spiel' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'sport' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'subasta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'tec' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'tech' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'tienda' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'travel' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'turismo' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'usa' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
|
||||
'verein' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'viaje' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'viagem' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'video' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'voyage' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'xxx' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
|
||||
'z' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}'
|
||||
);
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue