changed naming schema for country handlers
This commit is contained in:
parent
9fc40f2df8
commit
3a85bf6cac
29 changed files with 197 additions and 263 deletions
|
@ -1,3 +1,6 @@
|
|||
2005/07/17 David Saez <david@ols.es>
|
||||
- changed naming schema for country handlers
|
||||
|
||||
2005/07/16 David Saez <david@ols.es>
|
||||
- normalized expired/created/chaged dates
|
||||
- report non existant dns servers
|
||||
|
@ -7,6 +10,7 @@
|
|||
- improvments & fixes to esnic, denic and brnic
|
||||
handlers
|
||||
- added configurable timeout for sockec communications
|
||||
- changed naming schema for ip handlers
|
||||
|
||||
2005/04/28 David Saez <david@ols.es>
|
||||
- Fixed .fm handling
|
||||
|
|
|
@ -142,6 +142,7 @@ $items = array (
|
|||
'street:' => 'address.street',
|
||||
'language:' => '',
|
||||
'location:' => 'address.city',
|
||||
'country:' => 'address.country',
|
||||
'name:' => 'name',
|
||||
'fax.' => 'fax',
|
||||
'tel.' => 'phone'
|
||||
|
|
|
@ -30,21 +30,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* dedicated to klopfer, *24.07.1999, +21.01.2001 */
|
||||
/* based upon brnic.whois by Marcelo Sanches msanches@sitebox.com.br */
|
||||
|
||||
if(!defined("__ATNIC_HANDLER__")) define("__ATNIC_HANDLER__",1);
|
||||
if(!defined("__AT_HANDLER__")) define("__AT_HANDLER__",1);
|
||||
|
||||
include_once('generic.whois');
|
||||
|
||||
class atnic extends Whois
|
||||
class at_handler extends Whois
|
||||
{
|
||||
function atnic($data) { $this->result=$this->parse($data); }
|
||||
|
||||
function parse ($data_str) {
|
||||
|
||||
$translate = array (
|
||||
"fax-no" => "fax",
|
||||
"e-mail" => "email",
|
||||
"nic-hdl" => "handle",
|
||||
"person" => "name"
|
||||
'fax-no' => 'fax',
|
||||
'e-mail' => 'email',
|
||||
'nic-hdl' => 'handle',
|
||||
'person' => 'name',
|
||||
'personname' => 'name',
|
||||
'street address' => 'address.street',
|
||||
'city' => 'address.city',
|
||||
'postal code' => 'address.zcode',
|
||||
'country' => 'address.country'
|
||||
);
|
||||
|
||||
$contacts = array (
|
|
@ -31,15 +31,11 @@
|
|||
/* aunic.whois 1.0 by Edi Wibowo <edi@ausnik-it.com,http://www.ausnik-it.com> */
|
||||
/* check with telstra.com.au */
|
||||
|
||||
if(!defined("__AUNIC_HANDLER__")) define("__AUNIC_HANDLER__",1);
|
||||
if(!defined("__AU_HANDLER__")) define("__AU_HANDLER__",1);
|
||||
|
||||
include_once('generic2.whois');
|
||||
|
||||
class aunic extends Whois {
|
||||
|
||||
function aunic($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class au_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
8
benic.whois → src/whois.be.php
Executable file → Normal file
8
benic.whois → src/whois.be.php
Executable file → Normal file
|
@ -31,13 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
include_once('generic3.whois');
|
||||
include_once('getdate.whois');
|
||||
|
||||
if(!defined("__BENIC_HANDLER__")) define("__BENIC_HANDLER__",1);
|
||||
if(!defined("__BE_HANDLER__")) define("__BE_HANDLER__",1);
|
||||
|
||||
class benic extends Whois {
|
||||
|
||||
function benic($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class be_handler extends Whois {
|
||||
|
||||
function parse ($data) {
|
||||
|
27
neulevel.whois → src/whois.biz.php
Executable file → Normal file
27
neulevel.whois → src/whois.biz.php
Executable file → Normal file
|
@ -28,15 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* neulevel.whois 2.2 David Saez */
|
||||
/* neulevel.whois 1.0 by Brian Blood <brian@macserve.net> */
|
||||
|
||||
if(!defined("__NEULEVEL_HANDLER__")) define("__NEULEVEL_HANDLER__",1);
|
||||
if(!defined("__BIZ_HANDLER__")) define("__BIZ_HANDLER__",1);
|
||||
|
||||
require_once("generic2.whois");
|
||||
require_once('generic2.whois');
|
||||
|
||||
class neulevel extends Whois {
|
||||
|
||||
function neulevel($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class biz_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
||||
|
@ -51,42 +47,50 @@ function parse ($data_str) {
|
|||
"owner.handle" => "Registrant ID:",
|
||||
"owner.name" => "Registrant Name:",
|
||||
"owner.organization" => "Registrant Organization:",
|
||||
"owner.address.street" => "Registrant Address1:",
|
||||
"owner.address.street.0" => "Registrant Address1:",
|
||||
"owner.address.street.1" => "Registrant Address2:",
|
||||
"owner.address.zcode" => "Registrant Postal Code:",
|
||||
"owner.address.city" => "Registrant City:",
|
||||
"owner.address.state" => "Registrant State/Province:",
|
||||
"owner.address.country" => "Registrant Country:",
|
||||
"owner.phone" => "Registrant Phone Number:",
|
||||
'owner.fax' => 'Registrant Facsimile Number:',
|
||||
"owner.email" => "Registrant Email:",
|
||||
"admin.handle" => "Administrative Contact ID:",
|
||||
"admin.name" => "Administrative Contact Name:",
|
||||
"admin.organization" => "Administrative Contact Organization:",
|
||||
"admin.address.street" => "Administrative Contact Address1:",
|
||||
"admin.address.street.0" => "Administrative Contact Address1:",
|
||||
"admin.address.street.1" => "Administrative Contact Address2:",
|
||||
"admin.address.zcode" => "Administrative Contact Postal Code:",
|
||||
"admin.address.city" => "Administrative Contact City:",
|
||||
"admin.address.state" => "Administrative Contact State/Province:",
|
||||
"admin.address.country" => "Administrative Contact Country:",
|
||||
"admin.phone" => "Administrative Contact Phone Number:",
|
||||
"admin.email" => "Administrative Contact Email:",
|
||||
'admin.fax' => 'Administrative Contact Facsimile Number:',
|
||||
"tech.handle" => "Technical Contact ID:",
|
||||
"tech.name" => "Technical Contact Name:",
|
||||
"tech.organization" => "Technical Contact Organization:",
|
||||
"tech.address.street" => "Technical Contact Address1:",
|
||||
"tech.address.street.0" => "Technical Contact Address1:",
|
||||
"tech.address.street.1" => "Technical Contact Address2:",
|
||||
"tech.address.zcode" => "Technical Contact Postal Code:",
|
||||
"tech.address.city" => "Technical Contact City:",
|
||||
"tech.address.state" => "Technical Contact State/Province:",
|
||||
"tech.address.country" => "Technical Contact Country:",
|
||||
"tech.phone" => "Technical Contact Phone Number:",
|
||||
'tech.fax' => 'Technical Contact Facsimile Number:',
|
||||
"tech.email" => "Technical Contact Email:",
|
||||
"billing.handle" => "Billing Contact ID:",
|
||||
"billing.name" => "Billing Contact Name:",
|
||||
"billing.organization" => "Billing Contact Organization:",
|
||||
"billing.address.street" => "Billing Contact Address1:",
|
||||
"billing.address.street.1" => "Billing Contact Address1:",
|
||||
"billing.address.street.0" => "Billing Contact Address2:",
|
||||
"billing.address.zcode" => "Billing Contact Postal Code:",
|
||||
"billing.address.city" => "Billing Contact City:",
|
||||
"billing.address.state" => "Billing Contact State/Province:",
|
||||
"billing.address.country" => "Billing Contact Country:",
|
||||
"billing.phone" => "Billing Contact Phone Number:",
|
||||
'billing.fax' => 'Billing Contact Facsimile Number:',
|
||||
"billing.email" => "Billing Contact Email:"
|
||||
);
|
||||
|
||||
|
@ -95,7 +99,6 @@ function parse ($data_str) {
|
|||
|
||||
$r['regyinfo'] = array( 'referrer' => 'http://www.neulevel.biz',
|
||||
'registrar' => 'NEULEVEL' );
|
||||
|
||||
return($r);
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
Whois2.php PHP classes to conduct whois queries
|
||||
Whois2.php PHP classes to conduct whois queries
|
||||
|
||||
Copyright (C)1999,2000 easyDNS Technologies Inc. & Mark Jeftovic
|
||||
|
||||
Maintained by Mark Jeftovic <markjr@easydns.com>
|
||||
Maintained by Mark Jeftovic <markjr@easydns.com>
|
||||
|
||||
For the most recent version of this package:
|
||||
For the most recent version of this package:
|
||||
|
||||
http://www.easydns.com/~markjr/whois2/
|
||||
|
||||
|
@ -25,18 +25,14 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* bripw.whois 1.0 David Saez 04/04/2003 */
|
||||
/* brnic.whois 2.1 David Saez <david@ols.es>
|
||||
/* brnic.whois 1.0 by Marcelo Sanches msanches@sitebox.com.br */
|
||||
|
||||
require_once("generic.whois");
|
||||
include_once("generic.whois");
|
||||
|
||||
if(!defined("__BRIPW_HANDLER__")) define("__BRIPW_HANDLER__",1);
|
||||
if(!defined("__BR_HANDLER__")) define("__BR_HANDLER__",1);
|
||||
|
||||
class bripw extends ipw {
|
||||
|
||||
function bripw($data)
|
||||
{
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class br_handler extends Whois {
|
||||
|
||||
function parse ($data_str)
|
||||
{
|
||||
|
@ -45,33 +41,41 @@ $translate = array (
|
|||
"e-mail" => "email",
|
||||
"nic-hdl-br" => "handle",
|
||||
"person" => "name",
|
||||
"netname" => "name"
|
||||
"netname" => "name",
|
||||
"domain" => "name",
|
||||
"updated" => ""
|
||||
);
|
||||
|
||||
$contacts = array (
|
||||
"owner-c" => "owner",
|
||||
"tech-c" => "tech",
|
||||
"abuse-c" => "abuse"
|
||||
"admin-c" => "admin",
|
||||
"billing-c" => "billing"
|
||||
);
|
||||
|
||||
$r = generic_whois($data_str,$translate,$contacts,"network");
|
||||
$r = generic_whois($data_str["rawdata"],$translate,$contacts,"domain",'Ymd');
|
||||
|
||||
unset($r["network"]["owner"]);
|
||||
unset($r["network"]["ownerid"]);
|
||||
unset($r["network"]["responsible"]);
|
||||
unset($r["network"]["address"]);
|
||||
unset($r["network"]["phone"]);
|
||||
$r["network"]["handle"]=$r["network"]["aut-num"];
|
||||
unset($r["network"]["aut-num"]);
|
||||
unset($r["network"]["nsstat"]);
|
||||
unset($r["network"]["nslastaa"]);
|
||||
unset($r["network"]["inetrev"]);
|
||||
$a['regyinfo']=array( "registrar"=>"BR-NIC", "referrer"=>"http://www.nic.br");
|
||||
|
||||
if (isset($r["network"]["nserver"]))
|
||||
$r["network"]["nserver"]=array_unique($r["network"]["nserver"]);
|
||||
if (in_array('Permission denied.',$r['disclaimer']))
|
||||
{
|
||||
$r['registered']='unknown';
|
||||
return $r;
|
||||
}
|
||||
|
||||
return $r;
|
||||
unset($r["domain"]["nsstat"]);
|
||||
unset($r["domain"]["nslastaa"]);
|
||||
|
||||
$r["owner"]["organization"]=$r["domain"]["owner"];
|
||||
|
||||
unset($r["domain"]["owner"]);
|
||||
unset($r["domain"]["responsible"]);
|
||||
unset($r["domain"]["address"]);
|
||||
unset($r["domain"]["phone"]);
|
||||
|
||||
$a['regrinfo']=$r;
|
||||
|
||||
return($a);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
8
cira.whois → src/whois.ca.php
Executable file → Normal file
8
cira.whois → src/whois.ca.php
Executable file → Normal file
|
@ -29,15 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* 2.0 David Saez <david@ols.es> */
|
||||
/* standarized object model */
|
||||
|
||||
if(!defined("__CIRA_HANDLER__")) define("__CIRA_HANDLER__",1);
|
||||
if(!defined("__CA_HANDLER__")) define("__CA_HANDLER__",1);
|
||||
|
||||
include_once("generic2.whois");
|
||||
|
||||
class cira extends Whois {
|
||||
|
||||
function cira($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class ca_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -35,14 +35,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
require_once('generic3.whois');
|
||||
require_once('getdate.whois');
|
||||
|
||||
if(!defined("__CHNIC_HANDLER__")) define("__CHNIC_HANDLER__",1);
|
||||
if(!defined("__CH_HANDLER__")) define("__CH_HANDLER__",1);
|
||||
|
||||
class chnic extends Whois {
|
||||
|
||||
function chnic($data)
|
||||
{
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class ch_handler extends Whois {
|
||||
|
||||
function parse ($data_str)
|
||||
{
|
|
@ -29,15 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* lunic.whois 2.0 David Saez <david@ols.es> 2003/09/08 */
|
||||
/* cnnic.whois 1.0 Chewy - 2003/Sep/03 */
|
||||
|
||||
if(!defined("__CNNIC_HANDLER__")) define("__CNNIC_HANDLER__",1);
|
||||
if(!defined("__CN_HANDLER__")) define("__CN_HANDLER__",1);
|
||||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class cnnic extends Whois {
|
||||
|
||||
function cnnic($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class cn_handler extends Whois {
|
||||
|
||||
function parse($data_str) {
|
||||
$items = array(
|
|
@ -27,17 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
/* dotfm.whois 1.0 David Saez 4/4/2003 */
|
||||
|
||||
if(!defined("__DOTFM_HANDLER__")) define("__DOTFM_HANDLER__",1);
|
||||
if(!defined("__FM_HANDLER__")) define("__FM_HANDLER__",1);
|
||||
|
||||
require_once('generic2.whois');
|
||||
require_once('generic3.whois');
|
||||
|
||||
class dotfm extends Whois {
|
||||
|
||||
function dotfm($data)
|
||||
{
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class fm_handler extends Whois {
|
||||
|
||||
function parse ($data)
|
||||
{
|
2
gtld.whois → src/whois.gtld.php
Normal file → Executable file
2
gtld.whois → src/whois.gtld.php
Normal file → Executable file
|
@ -34,7 +34,7 @@ if(!defined("__GTLD_HANDLER__")) define("__GTLD_HANDLER__",1);
|
|||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class gtld extends Whois {
|
||||
class gtld_handler extends Whois {
|
||||
|
||||
var $HANDLER_VERSION = "1.1";
|
||||
|
5
hunic.whois → src/whois.hu.php
Executable file → Normal file
5
hunic.whois → src/whois.hu.php
Executable file → Normal file
|
@ -28,14 +28,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* hunic.whois 0.01 Manuel Machajdik <machajdik@gmxpro.net> */
|
||||
/* based upon org.whois and atnic.whois */
|
||||
|
||||
if(!defined("__HUNIC_HANDLER__")) define("__HUNIC_HANDLER__",1);
|
||||
if(!defined("__HU_HANDLER__")) define("__HU_HANDLER__",1);
|
||||
|
||||
include_once("generic.whois");
|
||||
include_once('getdate.whois');
|
||||
|
||||
class hunic extends Whois
|
||||
class hu_handler extends Whois
|
||||
{
|
||||
function hunic($data) { $this->result=$this->parse($data); }
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -33,11 +33,7 @@ if(!defined("__INFO_HANDLER__")) define("__INFO_HANDLER__",1);
|
|||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class info extends Whois {
|
||||
|
||||
function info($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class info_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
||||
|
@ -52,8 +48,8 @@ class info extends Whois {
|
|||
"owner.handle" => "Registrant ID:",
|
||||
"owner.name" => "Registrant Name:",
|
||||
"owner.organization" => "Registrant Organization:",
|
||||
"owner.address.street" => "Registrant Street1:",
|
||||
"owner.address.street2" => "Registrant Street2:",
|
||||
"owner.address.street.0" => "Registrant Street1:",
|
||||
"owner.address.street.1" => "Registrant Street2:",
|
||||
"owner.address.city" => "Registrant City:",
|
||||
"owner.address.state" => "Registrant State/Province:",
|
||||
"owner.address.pcode" => "Registrant Postal Code:",
|
||||
|
@ -64,8 +60,8 @@ class info extends Whois {
|
|||
"admin.handle" => "Admin ID:",
|
||||
"admin.name" => "Admin Name:",
|
||||
"admin.organization" => "Admin Organization:",
|
||||
"admin.address.street" => "Admin Street1:",
|
||||
"admin.address.street2" => "Admin Street2:",
|
||||
"admin.address.street.0" => "Admin Street1:",
|
||||
"admin.address.street.1" => "Admin Street2:",
|
||||
"admin.address.city" => "Admin City:",
|
||||
"admin.address.state" => "Admin State/Province:",
|
||||
"admin.address.pcode" => "Admin Postal Code:",
|
||||
|
@ -76,8 +72,8 @@ class info extends Whois {
|
|||
"tech.handle" => "Tech ID:",
|
||||
"tech.name" => "Tech Name:",
|
||||
"tech.organization" => "Tech Organization:",
|
||||
"tech.address.street" => "Tech Street1:",
|
||||
"tech.address.street2" => "Tech Street2:",
|
||||
"tech.address.street.0" => "Tech Street1:",
|
||||
"tech.address.street.1" => "Tech Street2:",
|
||||
"tech.address.city" => "Tech City:",
|
||||
"tech.address.state" => "Tech State/Province:",
|
||||
"tech.address.pcode" => "Tech Postal Code:",
|
||||
|
@ -88,8 +84,8 @@ class info extends Whois {
|
|||
"billing.handle" => "Billing ID:",
|
||||
"billing.name" => "Billing Name:",
|
||||
"billing.organization" => "Billing Organization:",
|
||||
"billing.address.street" => "Billing Street1:",
|
||||
"billing.address.street2" => "Billing Street2:",
|
||||
"billing.address.street.0" => "Billing Street1:",
|
||||
"billing.address.street.1" => "Billing Street2:",
|
||||
"billing.address.city" => "Billing City:",
|
||||
"billing.address.state" => "Billing State/Province:",
|
||||
"billing.address.pcode" => "Billing Postal Code:",
|
|
@ -27,13 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
/* isnic.whois 1.00 David Saez <david@ols.es> */
|
||||
|
||||
if(!defined("__ISNIC_HANDLER__")) define("__ISNIC_HANDLER__",1);
|
||||
if(!defined("__IS_HANDLER__")) define("__IS_HANDLER__",1);
|
||||
|
||||
include_once('generic.whois');
|
||||
|
||||
class isnic extends Whois
|
||||
class is_handler extends Whois
|
||||
{
|
||||
function isnic($data) { $this->result=$this->parse($data); }
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -29,15 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* lunic.whois 2.0 David Saez <david@ols.es> 2003/01/26 */
|
||||
/* lunic.whois 1.0 J.M. Roth <jmroth@iip.lu> 2002/11/03 */
|
||||
|
||||
if(!defined("__LUNIC_HANDLER__")) define("__LUNIC_HANDLER__",1);
|
||||
if(!defined("__LU_HANDLER__")) define("__LU_HANDLER__",1);
|
||||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class lunic extends Whois {
|
||||
|
||||
function lunic($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class lu_handler extends Whois {
|
||||
|
||||
function parse($data_str) {
|
||||
$items = array(
|
|
@ -38,7 +38,7 @@ class Whois {
|
|||
var $VERSION;
|
||||
|
||||
// This release of the package
|
||||
var $CODE_VERSION = "3.0.4";
|
||||
var $CODE_VERSION = "4.0.0";
|
||||
|
||||
// Network Solutions registry server
|
||||
var $NSI_REGISTRY = "whois.nsiregistry.net";
|
||||
|
@ -154,10 +154,11 @@ class Whois {
|
|||
$this->Query["tld"] = $key;
|
||||
|
||||
// If a handler exists for the tld
|
||||
|
||||
if(isSet($this->DATA[$key])) {
|
||||
// Set file/handler in query array
|
||||
$handler = $this->DATA[$key];
|
||||
$this->Query["file"] = sprintf("%s.whois",$handler);
|
||||
$this->Query["file"] = "whois.$handler.php";
|
||||
$this->Query["handler"] = $handler;
|
||||
}
|
||||
return;
|
||||
|
@ -203,7 +204,7 @@ class Whois {
|
|||
{
|
||||
// Set file/handler in query array
|
||||
$handler = $this->DATA[$htld];
|
||||
$this->Query["file"] = sprintf("%s.whois", $handler);
|
||||
$this->Query['file'] = "whois.$handler.php";
|
||||
$this->Query["handler"] = $handler;
|
||||
break;
|
||||
}
|
||||
|
@ -282,6 +283,7 @@ class Whois {
|
|||
|
||||
// If the handler has not already been included somehow, include it now
|
||||
$HANDLER_FLAG = sprintf("__%s_HANDLER__", strtoupper($this->Query["handler"]));
|
||||
|
||||
if(!defined($HANDLER_FLAG))
|
||||
@include($this->Query["file"]);
|
||||
|
||||
|
@ -291,19 +293,19 @@ class Whois {
|
|||
return($result);
|
||||
}
|
||||
|
||||
if (!$this->gtld_recurse && $this->Query["file"]=='gtld.whois')
|
||||
if (!$this->gtld_recurse && $this->Query["file"]=='whois.com.php')
|
||||
return $result;
|
||||
|
||||
// Pass result to handler
|
||||
$object = $this->Query["handler"];
|
||||
$handler = new $object($result, $this->Query);
|
||||
$object = $this->Query['handler'].'_handler';
|
||||
$handler = new $object('');
|
||||
|
||||
// If handler returned an error, append it to the query errors list
|
||||
if(isSet($handler->Query["errstr"]))
|
||||
$this->Query["errstr"][] = $handler->Query["errstr"];
|
||||
|
||||
// Return the result
|
||||
return($handler->result);
|
||||
return $handler->parse($result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -408,7 +410,9 @@ class Whois {
|
|||
while (list($k, $p) = each($parts)) {
|
||||
if ($p=='') continue;
|
||||
if (ip2long($p)===-1)
|
||||
$host=$p;
|
||||
{
|
||||
if ($host=='') $host=$p;
|
||||
}
|
||||
else
|
||||
$ip=$p;
|
||||
}
|
||||
|
|
|
@ -29,15 +29,11 @@
|
|||
/* mxnic.whois 1.0 Torfinn Nome <torfinn@nome.no> 2003-02-15 */
|
||||
/* Based upon info.whois by David Saez Padros <david@ols.es> */
|
||||
|
||||
if(!defined("__MXNIC_HANDLER__")) define("__MXNIC_HANDLER__",1);
|
||||
if(!defined("__MX_HANDLER__")) define("__MX_HANDLER__",1);
|
||||
|
||||
require_once('getdate.whois');
|
||||
|
||||
class mxnic extends Whois {
|
||||
|
||||
function mxnic($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class mx_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -29,17 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* nlnic.whois 1.1 David Saez - common object model */
|
||||
/* nlnic.whois 1.0 Matthijs Koot - 2003/01/14 - <koot@cyberwar.nl> */
|
||||
|
||||
if(!defined("__NLNIC_HANDLER__")) define("__NLNIC_HANDLER__",1);
|
||||
if(!defined("__NL_HANDLER__")) define("__NL_HANDLER__",1);
|
||||
|
||||
require_once("generic3.whois");
|
||||
require_once('getdate.whois');
|
||||
|
||||
class nlnic extends Whois {
|
||||
|
||||
function nlnic($data)
|
||||
{
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class nl_handler extends Whois {
|
||||
|
||||
function parse ($data)
|
||||
{
|
|
@ -29,15 +29,11 @@
|
|||
/* nunames.whois 0.99 Stefan Alfredsson <stefan@alfredsson.org> */
|
||||
/* Based upon uknic.whois by David Saez Padros */
|
||||
|
||||
if(!defined("__NUNAMES_HANDLER__")) define("__NUNAMES_HANDLER__",1);
|
||||
if(!defined("__NU_HANDLER__")) define("__NU_HANDLER__",1);
|
||||
|
||||
require_once('getdate.whois');
|
||||
|
||||
class nunames extends Whois {
|
||||
|
||||
function nunames($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class nu_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
$items=array(
|
|
@ -32,7 +32,7 @@ if(!defined("__ORG_HANDLER__")) define("__ORG_HANDLER__",1);
|
|||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class org extends Whois {
|
||||
class org_handler extends Whois {
|
||||
|
||||
function org($data) {
|
||||
$this->result = $this->parse($data);
|
|
@ -30,15 +30,11 @@
|
|||
/* senic.whois 0.99 Stefan Alfredsson <stefan@alfredsson.org> */
|
||||
/* Based upon uknic.whois by David Saez Padros */
|
||||
|
||||
if(!defined("__NICSE_HANDLER__")) define("__NICSE_HANDLER__",1);
|
||||
if(!defined("__SE_HANDLER__")) define("__SE_HANDLER__",1);
|
||||
|
||||
require_once('generic2.whois');
|
||||
|
||||
class nicse extends Whois {
|
||||
|
||||
function nicse($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class se_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
$items=array(
|
|
@ -33,33 +33,33 @@
|
|||
$this->DATA_VERSION = "18";
|
||||
|
||||
$this->DATA = array(
|
||||
"at" => "atnic",
|
||||
"au" => "aunic",
|
||||
"biz" => "neulevel",
|
||||
"be" => "benic",
|
||||
"br" => "brnic",
|
||||
"ca" => "cira",
|
||||
"ch" => "chnic",
|
||||
"cn" => "cnnic",
|
||||
"at" => "at",
|
||||
"au" => "au",
|
||||
"biz" => "biz",
|
||||
"be" => "be",
|
||||
"br" => "br",
|
||||
"ca" => "ca",
|
||||
"ch" => "ch",
|
||||
"cn" => "cn",
|
||||
"com" => "gtld",
|
||||
"de" => "denic",
|
||||
"es" => "esnic",
|
||||
"fm" => "dotfm",
|
||||
"hu" => "hunic",
|
||||
"de" => "de",
|
||||
"es" => "es",
|
||||
"fm" => "fm",
|
||||
"hu" => "hu",
|
||||
"info" => "info",
|
||||
"is" => "isnic",
|
||||
"li" => "chnic",
|
||||
"lu" => "lunic",
|
||||
"mx" => "mxnic",
|
||||
"is" => "is",
|
||||
"li" => "ch",
|
||||
"lu" => "lu",
|
||||
"mx" => "mx",
|
||||
"net" => "gtld",
|
||||
"nl" => "nlnic",
|
||||
"nu" => "nunames",
|
||||
"nl" => "nl",
|
||||
"nu" => "nu",
|
||||
"org" => "org",
|
||||
"se" => "nicse",
|
||||
"se" => "se",
|
||||
"tv" => "gtld",
|
||||
"uk" => "uknic",
|
||||
"us" => "neustar",
|
||||
"ws" => "wsnic",
|
||||
"uk" => "uk",
|
||||
"us" => "us",
|
||||
"ws" => "ws",
|
||||
"ipw" => "ipw" // Dummy, just for ip whois
|
||||
);
|
||||
|
||||
|
|
|
@ -35,15 +35,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/* also updated for common object model */
|
||||
/* uknic.whois 1.5 03/03/2003 minor fixes */
|
||||
|
||||
if(!defined("__UKNIC_HANDLER__")) define("__UKNIC_HANDLER__",1);
|
||||
if(!defined("__UK_HANDLER__")) define("__UK_HANDLER__",1);
|
||||
|
||||
require_once('getdate.whois');
|
||||
|
||||
class uknic extends Whois {
|
||||
|
||||
function uknic($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class uk_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
$items=array(
|
||||
|
@ -52,7 +48,9 @@ class uknic extends Whois {
|
|||
"domain.name" => "Domain Name:",
|
||||
"domain.sponsor" => "Registrant's Agent:",
|
||||
"domain.created" => "Registered on:",
|
||||
"domain.changed" => "Last updated:"
|
||||
"domain.changed" => "Last updated:",
|
||||
"domain.expires" => "Renewal Date:",
|
||||
"domain.status" => "Registration Status:"
|
||||
);
|
||||
|
||||
$r['rawdata']=$data_str['rawdata'];
|
||||
|
@ -95,9 +93,8 @@ class uknic extends Whois {
|
|||
if (!empty($r["regrinfo"]["domain"]["name"])) {
|
||||
$r["regrinfo"]["registered"] = "yes";
|
||||
|
||||
if (!empty($r["regrinfo"]["domain"]["nserver"]))
|
||||
$r["regrinfo"]["domain"]["status"]="active";
|
||||
else {
|
||||
if (empty($r["regrinfo"]["domain"]["nserver"]))
|
||||
{
|
||||
if (strstr($r["regrinfo"]["domain"]["sponsor"],"DETAGGED"))
|
||||
$r["regrinfo"]["domain"]["status"]="detagged";
|
||||
else
|
|
@ -27,15 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
/* neulevel.whois 1.0 by David Saez <david @ ols . es> */
|
||||
|
||||
if(!defined("__NEUSTAR_HANDLER__")) define("__NEUSTAR_HANDLER__",1);
|
||||
if(!defined("__US_HANDLER__")) define("__US_HANDLER__",1);
|
||||
|
||||
require_once("generic2.whois");
|
||||
|
||||
class neustar extends Whois {
|
||||
|
||||
function neustar($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class us_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -6,14 +6,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if(!defined("__WSNIC_HANDLER__")) define("__WSNIC_HANDLER__",1);
|
||||
if(!defined("__WS_HANDLER__")) define("__WS_HANDLER__",1);
|
||||
|
||||
require_once('getdate.whois');
|
||||
|
||||
class wsnic extends Whois {
|
||||
function wsnic($data) {
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
class ws_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
$items=array(
|
43
test.txt
43
test.txt
|
@ -1,25 +1,26 @@
|
|||
// Country domains
|
||||
|
||||
atnic nic.at
|
||||
aunic telstra.com.au
|
||||
benic nic.be
|
||||
brnic registro.br
|
||||
chnic creart.ch blaueskreuz.ch
|
||||
cira cira.ca (v)
|
||||
cnnic cnnic.net.cn
|
||||
denic 4ever.de
|
||||
dotfm dot.fm
|
||||
esnic ols.es
|
||||
hunic nic.hu
|
||||
isnic isnic.is
|
||||
lunic dns.lu
|
||||
mxnic nic.mx
|
||||
neustar neustar.us
|
||||
nicse nic-se.se
|
||||
nlnic domain-registry.nl
|
||||
nunames nunames.nu
|
||||
uknic olsns.co.uk
|
||||
wsnic samoanic.ws
|
||||
at nic.at
|
||||
au telstra.com.au
|
||||
be nic.be
|
||||
br registro.br
|
||||
ca cira.ca
|
||||
ch creart.ch blaueskreuz.ch
|
||||
cn cnnic.net.cn
|
||||
de 4ever.de
|
||||
es ols.es
|
||||
fm dot.fm
|
||||
hu nic.hu
|
||||
is isnic.is
|
||||
li nic.li
|
||||
lu dns.lu
|
||||
mx nic.mx
|
||||
nl domain-registry.nl
|
||||
nu nunames.nu
|
||||
se nic-se.se
|
||||
uk olsns.co.uk
|
||||
us neustar.us
|
||||
ws samoanic.ws
|
||||
|
||||
// .com/.org/.net/.tv
|
||||
|
||||
|
@ -53,7 +54,7 @@ wwd iprocommunicator.com
|
|||
|
||||
info afilias.info
|
||||
org ascio.org buydomains.org ...
|
||||
neulevel forumed.biz
|
||||
biz neulevel.biz
|
||||
|
||||
// IP whois
|
||||
|
||||
|
|
|
@ -36,27 +36,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if(!defined("__ESNIC_HANDLER__")) define("__ESNIC_HANDLER__",1);
|
||||
if(!defined("__ES_HANDLER__")) define("__ES_HANDLER__",1);
|
||||
|
||||
require_once('generic3.whois');
|
||||
require_once('getdate.whois');
|
||||
|
||||
function buscar ($what, $where)
|
||||
{
|
||||
$search = trim(strstr($what[0],' '));
|
||||
|
||||
while (list ($key, $val) = each ($where)) {
|
||||
if (array_search($search,$val))
|
||||
return $val;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
class esnic extends Whois {
|
||||
|
||||
function esnic($data) {
|
||||
$this->result = $this->parse($data);
|
||||
}
|
||||
class es_handler extends Whois {
|
||||
|
||||
function parse ($data_str) {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
Whois2.php PHP classes to conduct whois queries
|
||||
Whois2.php PHP classes to conduct whois queries
|
||||
|
||||
Copyright (C)1999,2000 easyDNS Technologies Inc. & Mark Jeftovic
|
||||
|
||||
Maintained by Mark Jeftovic <markjr@easydns.com>
|
||||
Maintained by Mark Jeftovic <markjr@easydns.com>
|
||||
|
||||
For the most recent version of this package:
|
||||
For the most recent version of this package:
|
||||
|
||||
http://www.easydns.com/~markjr/whois2/
|
||||
|
||||
|
@ -25,17 +25,17 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* brnic.whois 2.1 David Saez <david@ols.es>
|
||||
/* brnic.whois 1.0 by Marcelo Sanches msanches@sitebox.com.br */
|
||||
/* bripw.whois 1.0 David Saez 04/04/2003 */
|
||||
|
||||
include_once("generic.whois");
|
||||
require_once("generic.whois");
|
||||
|
||||
if(!defined("__BRNIC_HANDLER__")) define("__BRNIC_HANDLER__",1);
|
||||
if(!defined("__BRIPW_HANDLER__")) define("__BRIPW_HANDLER__",1);
|
||||
|
||||
class brnic extends Whois {
|
||||
class bripw extends ipw {
|
||||
|
||||
function brnic($data) {
|
||||
$this->result=$this->parse($data);
|
||||
function bripw($data)
|
||||
{
|
||||
$this->result=$this->parse($data);
|
||||
}
|
||||
|
||||
function parse ($data_str)
|
||||
|
@ -45,41 +45,33 @@ $translate = array (
|
|||
"e-mail" => "email",
|
||||
"nic-hdl-br" => "handle",
|
||||
"person" => "name",
|
||||
"netname" => "name",
|
||||
"domain" => "name",
|
||||
"updated" => ""
|
||||
"netname" => "name"
|
||||
);
|
||||
|
||||
$contacts = array (
|
||||
"owner-c" => "owner",
|
||||
"tech-c" => "tech",
|
||||
"admin-c" => "admin",
|
||||
"billing-c" => "billing"
|
||||
"abuse-c" => "abuse"
|
||||
);
|
||||
|
||||
$r = generic_whois($data_str["rawdata"],$translate,$contacts,"domain",'Ymd');
|
||||
$r = generic_whois($data_str,$translate,$contacts,"network");
|
||||
|
||||
$a['regyinfo']=array( "registrar"=>"BR-NIC", "referrer"=>"http://www.nic.br");
|
||||
unset($r["network"]["owner"]);
|
||||
unset($r["network"]["ownerid"]);
|
||||
unset($r["network"]["responsible"]);
|
||||
unset($r["network"]["address"]);
|
||||
unset($r["network"]["phone"]);
|
||||
$r["network"]["handle"]=$r["network"]["aut-num"];
|
||||
unset($r["network"]["aut-num"]);
|
||||
unset($r["network"]["nsstat"]);
|
||||
unset($r["network"]["nslastaa"]);
|
||||
unset($r["network"]["inetrev"]);
|
||||
|
||||
if (in_array('Permission denied.',$r['disclaimer']))
|
||||
{
|
||||
$r['registered']='unknown';
|
||||
return $r;
|
||||
}
|
||||
if (isset($r["network"]["nserver"]))
|
||||
$r["network"]["nserver"]=array_unique($r["network"]["nserver"]);
|
||||
|
||||
unset($r["domain"]["nsstat"]);
|
||||
unset($r["domain"]["nslastaa"]);
|
||||
|
||||
$r["owner"]["organization"]=$r["domain"]["owner"];
|
||||
|
||||
unset($r["domain"]["owner"]);
|
||||
unset($r["domain"]["responsible"]);
|
||||
unset($r["domain"]["address"]);
|
||||
unset($r["domain"]["phone"]);
|
||||
|
||||
$a['regrinfo']=$r;
|
||||
|
||||
return($a);
|
||||
return $r;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue