Skip to content

Commit 423ab30

Browse files
author
Dmitry Lukashin
committed
Disable support for non-ICANN domains
1 parent e539a78 commit 423ab30

5 files changed

Lines changed: 60 additions & 166 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
5.0
2+
---
3+
* Disable support for non ICANN domains (Used new.net doesn't exist anymore)
4+
15
2011/07/09
26
----------
37
* html & cosmetic changes in examples

example.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
// To use special whois servers (see README)
6161
//$whois->UseServer('uk','whois.nic.uk:1043?{hname} {ip} {query}');
6262
//$whois->UseServer('au','whois-check.ausregistry.net.au');
63-
// Comment the following line to disable support for non ICANN tld's
64-
$whois->non_icann = true;
6563

6664
$result = $whois->Lookup($query);
6765
$resout = str_replace('{query}', $query, $resout);

handler.template.php

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,34 @@
11
<?php
2-
/*
3-
Whois.php PHP classes to conduct whois queries
4-
5-
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
6-
7-
Maintained by David Saez
8-
9-
For the most recent version of this package visit:
10-
11-
http://www.phpwhois.org
12-
13-
This program is free software; you can redistribute it and/or
14-
modify it under the terms of the GNU General Public License
15-
as published by the Free Software Foundation; either version 2
16-
of the License, or (at your option) any later version.
17-
18-
This program is distributed in the hope that it will be useful,
19-
but WITHOUT ANY WARRANTY; without even the implied warranty of
20-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21-
GNU General Public License for more details.
22-
23-
You should have received a copy of the GNU General Public License
24-
along with this program; if not, write to the Free Software
25-
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2+
/**
3+
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
4+
* @license
5+
* This program is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License
7+
* as published by the Free Software Foundation; either version 2
8+
* of the License, or (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program; if not, write to the Free Software
17+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* @link http://phpwhois.pw
20+
* @copyright Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
21+
* @copyright Maintained by David Saez
22+
* @copyright Copyright (c) 2014 Dmitry Lukashin
2623
*/
2724

2825
if (!defined('__XX_HANDLER__'))
29-
define('__XX_HANDLER__', 1);
26+
define('__XX_HANDLER__', 1);
3027

3128
require_once('whois.parser.php');
3229

33-
class xx_handler
34-
{
35-
function parse($data_str, $query)
36-
{
37-
return $r;
38-
}
39-
}
40-
?>
30+
class xx_handler {
31+
function parse($data_str, $query) {
32+
return $r;
33+
}
34+
}

src/Whois.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ class Whois extends WhoisClient {
3333

3434
/** @var boolean Deep whois? */
3535
public $deep_whois = true;
36+
3637
/** @var boolean Windows based? */
3738
public $windows = false;
39+
3840
/** @var boolean Recursion allowed? */
3941
public $gtld_recurse = true;
40-
/** @var boolean Support for non-ICANN tld's */
41-
public $non_icann = false;
42+
4243
/** @var string Network Solutions registry server */
4344
public $NSI_REGISTRY = 'whois.nsiregistry.net';
4445

@@ -150,10 +151,7 @@ public function Lookup($query = '', $is_utf = true) {
150151
}
151152

152153
// Search the correct whois server
153-
if ($this->non_icann)
154-
$special_tlds = array_merge($this->WHOIS_SPECIAL, $this->WHOIS_NON_ICANN);
155-
else
156-
$special_tlds = $this->WHOIS_SPECIAL;
154+
$special_tlds = $this->WHOIS_SPECIAL;
157155

158156
foreach ($tldtests as $tld) {
159157
// Test if we know in advance that no whois server is

src/whois.servers.php

Lines changed: 25 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<?php
2-
3-
/*
4-
Whois.php PHP classes to conduct whois queries
5-
6-
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
7-
8-
Maintained by David Saez
9-
10-
For the most recent version of this package visit:
11-
12-
http://www.phpwhois.org
13-
14-
This program is free software; you can redistribute it and/or
15-
modify it under the terms of the GNU General Public License
16-
as published by the Free Software Foundation; either version 2
17-
of the License, or (at your option) any later version.
18-
19-
This program is distributed in the hope that it will be useful,
20-
but WITHOUT ANY WARRANTY; without even the implied warranty of
21-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22-
GNU General Public License for more details.
23-
24-
You should have received a copy of the GNU General Public License
25-
along with this program; if not, write to the Free Software
26-
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2+
/**
3+
* Whois servers list
4+
*
5+
* This class supposed to be instantiated for using the phpWhois library
6+
*
7+
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
8+
* @license
9+
* This program is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU General Public License
11+
* as published by the Free Software Foundation; either version 2
12+
* of the License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Public License
20+
* along with this program; if not, write to the Free Software
21+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22+
*
23+
* @link http://phpwhois.pw
24+
* @copyright Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
25+
* @copyright Maintained by David Saez
26+
* @copyright Copyright (c) 2014 Dmitry Lukashin
2727
*/
2828

2929
/* servers.whois v18 Markus Welters 2004/06/25 */
@@ -652,103 +652,3 @@
652652
'whois.encirca.com' => 'genericb',
653653
'whois.corenic.net' => 'genericb'
654654
);
655-
656-
/* Non ICANN TLD's */
657-
658-
$this->WHOIS_NON_ICANN = array(
659-
'agent' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
660-
'agente' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
661-
'america' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
662-
'amor' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
663-
'amore' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
664-
'amour' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
665-
'arte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
666-
'artes' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
667-
'arts' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
668-
'asta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
669-
'auction' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
670-
'auktion' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
671-
'boutique' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
672-
'chat' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
673-
'chiesa' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
674-
'church' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
675-
'cia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
676-
'ciao' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
677-
'cie' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
678-
'club' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
679-
'clube' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
680-
'com2' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
681-
'deporte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
682-
'ditta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
683-
'earth' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
684-
'eglise' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
685-
'enchere' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
686-
'escola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
687-
'escuela' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
688-
'esporte' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
689-
'etc' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
690-
'famiglia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
691-
'familia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
692-
'familie' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
693-
'family' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
694-
'free' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
695-
'game' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
696-
'ges' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
697-
'gmbh' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
698-
'golf' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
699-
'gratis' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
700-
'gratuit' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
701-
'hola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
702-
'iglesia' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
703-
'igreja' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
704-
'inc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
705-
'jeu' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
706-
'jogo' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
707-
'juego' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
708-
'kids' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
709-
'kirche' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
710-
'krunst' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
711-
'law' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
712-
'legge' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
713-
'lei' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
714-
'leilao' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
715-
'ley' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
716-
'liebe' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
717-
'lion' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
718-
'llc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
719-
'llp' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
720-
'loi' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
721-
'loja' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
722-
'love' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
723-
'ltd' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
724-
'makler' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
725-
'med' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
726-
'mp3' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
727-
'not' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
728-
'online' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
729-
'recht' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
730-
'reise' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
731-
'resto' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
732-
'school' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
733-
'schule' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
734-
'scifi' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
735-
'scuola' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
736-
'shop' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
737-
'soc' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
738-
'spiel' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
739-
'sport' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
740-
'subasta' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
741-
'tec' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
742-
'tech' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
743-
'tienda' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
744-
'travel' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
745-
'turismo' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
746-
'usa' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
747-
'verein' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
748-
'viagem' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
749-
'viaje' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
750-
'video' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
751-
'voyage' => 'http://www.new.net/search_whois.tp?domain={domain}&tld={tld}',
752-
'z' => 'http://www.adns.net/whois.php?txtDOMAIN={domain}.{tld}',
753-
);
754-
?>

0 commit comments

Comments
 (0)