generic.whois moved to whois.parser.php

This commit is contained in:
sparc 2005-07-25 17:58:12 +00:00
parent 5292b3d27a
commit 406f04797b
10 changed files with 21 additions and 45 deletions

View file

@ -5,6 +5,7 @@
- rewritte of .uk handler
- whois client code moved to whois.client.php
- class inheritence revised
- generic.whois moved to whois.parser.php
2005/07/22 David Saez <david@ols.es>
- added CDIR to inetnum conversion for ip whois and

View file

@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if(!defined("__AT_HANDLER__")) define("__AT_HANDLER__",1);
include_once('generic.whois');
require_once('whois.parser.php');
class at_handler {
@ -61,7 +61,7 @@ $contacts = array (
$r["rawdata"]=$data_str["rawdata"];
$r["regyinfo"]=array("referrer"=>"http://www.nic.at","registrar"=>"NIC-AT");
$reg=generic_whois($data_str["rawdata"],$translate,$contacts,'domain','Ymd');
$reg=generic_parser_a($data_str["rawdata"],$translate,$contacts,'domain','Ymd');
if (isset($reg["domain"]["remarks"]))
unset($reg["domain"]["remarks"]);

View file

@ -28,7 +28,7 @@ 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 */
include_once("generic.whois");
require_once('whois.parser.php');
if(!defined("__BR_HANDLER__")) define("__BR_HANDLER__",1);
@ -53,7 +53,7 @@ $contacts = array (
"billing-c" => "billing"
);
$r = generic_whois($data_str["rawdata"],$translate,$contacts,"domain",'Ymd');
$r = generic_parser_a($data_str["rawdata"],$translate,$contacts,"domain",'Ymd');
$a['regyinfo']=array( "registrar"=>"BR-NIC", "referrer"=>"http://www.nic.br");

View file

@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if(!defined("__HU_HANDLER__")) define("__HU_HANDLER__",1);
include_once("generic.whois");
require_once('whois.parser.php');
include_once('getdate.whois');
class hu_handler {
@ -87,7 +87,7 @@ for ($i=1; $i<count($data_str['rawdata']); $i++) {
$r["rawdata"]=$data_str["rawdata"];
$reg=generic_whois($data_str["rawdata"],$translate,$contacts);
$reg=generic_parser_a($data_str["rawdata"],$translate,$contacts);
if ($reg['domain']) {

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* apnic.whois 1.0 David Saez 3/4/2003 */
require_once("generic.whois");
require_once('whois.parser.php');
if(!defined("__APNIC_HANDLER__")) define("__APNIC_HANDLER__",1);
@ -50,7 +50,7 @@ $contacts = array (
"tech-c" => "tech"
);
$r = generic_whois($data_str,$translate,$contacts,"network",'Ymd');
$r = generic_parser_a($data_str,$translate,$contacts,"network",'Ymd');
$r["owner"]["organization"] = $r["network"]["desc"][0];
unset($r["network"]["desc"][0]);

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* lacnic.whois 1.0 David Saez 3/7/2003 */
require_once("generic.whois");
require_once('whois.parser.php');
if(!defined("__LACNIC_HANDLER__")) define("__LACNIC_HANDLER__",1);
@ -51,7 +51,7 @@ $contacts = array (
"owner-c" => "owner"
);
$r = generic_whois($data_str,$translate,$contacts,"network");
$r = generic_parser_a($data_str,$translate,$contacts,"network");
if (isset($r['network']['nsstat'])) {
unset($r['network']['nsstat']);

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* ripe.whois 1.0 David Saez 7/6/2002 */
require_once("generic.whois");
require_once('whois.parser.php');
if(!defined("__RIPE_HANDLER__")) define("__RIPE_HANDLER__",1);
@ -49,7 +49,7 @@ $contacts = array (
"tech-c" => "tech"
);
$r = generic_whois($data_str,$translate,$contacts,"network");
$r = generic_parser_a($data_str,$translate,$contacts,"network");
$r["owner"]["organization"] = $r["network"]["desc"];
unset($r["network"]["desc"]);

View file

@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if(!defined("__IS_HANDLER__")) define("__IS_HANDLER__",1);
include_once('generic.whois');
require_once('whois.parser.php');
class is_handler {
@ -53,7 +53,7 @@ $contacts = array (
$r["rawdata"]=$data_str["rawdata"];
$r["regyinfo"]=array("referrer"=>"http://www.isnic.is","registrar"=>"ISNIC");
$reg=generic_whois($data_str["rawdata"],$translate,$contacts,'domain','mdy');
$reg=generic_parser_a($data_str["rawdata"],$translate,$contacts,'domain','mdy');
if (isset($reg['domain']['descr'])) {
$reg['owner']['name'] = array_shift($reg['domain']['descr']);

View file

@ -1,34 +1,8 @@
<?php
/*
Generic3.php PHP functions for parsing whois output
Copyright (C)2003
Maintained by Mark Jeftovic <markjr@easydns.com>
For the most recent version of this package:
http://www.easydns.com/~markjr/whois2/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
<?php
require_once('getdate.whois');
require_once('genutil.whois');
function generic_whois ($rawdata,$translate,$contacts,$main='domain',$dateformat='dmy')
function generic_parser_a ($rawdata,$translate,$contacts,$main='domain',$dateformat='dmy')
{
$r=array();
$newblock=false;
@ -116,4 +90,5 @@ format_dates($ret,$dateformat);
return $ret;
}
?>
?>

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* bripw.whois 1.0 David Saez 04/04/2003 */
require_once("generic.whois");
require_once('whois.parser.php');
if(!defined("__BRIPW_HANDLER__")) define("__BRIPW_HANDLER__",1);
@ -49,7 +49,7 @@ $contacts = array (
"abuse-c" => "abuse"
);
$r = generic_whois($data_str,$translate,$contacts,"network");
$r = generic_parser_a($data_str,$translate,$contacts,"network");
unset($r["network"]["owner"]);
unset($r["network"]["ownerid"]);