referrer correction and normalization in some handlers

This commit is contained in:
sparc 2003-03-22 21:17:44 +00:00
parent 2067f4fb65
commit f93d4932cf
15 changed files with 22 additions and 125 deletions

View file

@ -1,3 +1,10 @@
2003/03/22 David Saez <david@ols.es>
- referrer correction and normalization in some handlers
- removed unused handler cdnnet.whois
2003/03/22 Ross Golder <rossigee@users.sourceforge.net>
- Release 3.0.4 available now
2003/03/17 David Saez <david@ols.es>
- chnic.whois & nlnic.whois rewritten
- minor fix and improvment on generic3.whois

View file

@ -20,7 +20,7 @@ contains the raw text output returned by the whois server.
regyinfo contains information about the registry who returned that
information. It has three subkeys: 'whois' (the whois server who
returned the data), 'referer' (the web address of the registry)
returned the data), 'referrer' (the web address of the registry)
and 'registar' (the company name of the registry).
regrinfo holds the information about the domain itself. It could have

View file

@ -56,7 +56,7 @@ $contacts = array (
);
$r["rawdata"]=$data_str["rawdata"];
$r["regyinfo"]=array("whois"=>"whois.nic.at","referer"=>"www.nic.at","registrar"=>"NIC-AT");
$r["regyinfo"]=array("whois"=>"whois.nic.at","referrer"=>"http://www.nic.at","registrar"=>"NIC-AT");
$reg=generic_whois($data_str["rawdata"],$translate,$contacts);

View file

@ -1,111 +0,0 @@
<?php
/*
Whois2.php PHP classes to conduct whois queries
Copyright (C)1999,2000 easyDNS Technologies Inc. & Mark Jeftovic
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.
*/
/* cdnnet.whois 1.0 by Mark Jeftovic <markjr@easydns.com> */
if(!defined("__CDNNET_HANDLER__")) define("__CDNNET_HANDLER__",1);
class cdnnet extends Whois {
function cdnnet($data) {
$this->result=$this->parse($data);
}
function parse ($data_str) {
$items=array( "organization" => "Organization:",
"domain" => "Subdomain:",
"received" => "Date-Received:",
"approved" => "Date-Approved:",
"modified" => "Date-Modified:",
"desc" => "Description:",
"admin-name" => "Admin-Name:",
"admin-title" => "Admin-Title:",
"admin-address" => "Admin-Postal:",
"admin-phone" => "Admin-Phone:",
"admin-email" => "Admin-Mailbox:",
"tech-name" => "Tech-Name:",
"tech-title" => "Tech-Title:",
"tech-address" => "Tech-Postal:",
"tech-phone" => "Tech-Phone:",
"tech-email" => "Tech-Mailbox:",
"ns1" => "NS1-Hostname:",
"ns2" => "NS2-Hostname:",
"ns3" => "NS3-Hostname:",
"ns4" => "NS4-Hostname:",
"ns5" => "NS5-Hostname:",
"ns6" => "NS6-Hostname:",
"status" => "status:"
);
$r["rawdata"]=$data_str["rawdata"];
$regyinfo=array();
$r["regrinfo"]=array();
$r["regrinfo"]["ns"]=array();
while (list($key, $val)=each($data_str["rawdata"]))
{ $val=trim($val);
if ($val!="") {
reset($items);
while (list($field, $match)=each($items)) {
if (strstr($val,$match)) {
$r["regrinfo"][$field]=
trim(substr($val,strlen($match)));
break;
}
}
}
}
for($i = 0;$i<6;$i++) {
$var = sprintf("ns%d", $i+1);
if($r["regrinfo"][$var]) {
$r["regrinfo"]["ns"][$i]=$r["regrinfo"][$var];
}
}
if(!empty($r["regrinfo"])) {
$r["regyinfo"]=array( "whois"=>"whois.cdnnet.ca",
"referrer"=>"www.easydns.ca" );
$r["regyinfo"]["nameserver"]=$r["regrinfo"]["ns"];
$r["regyinfo"]["domain"]=$r["regrinfo"]["domain"];
$r["regyinfo"]["registrar"]=$r["regrinfo"]["registrar"];
$r["regyinfo"]["updated"]=$r["regrinfo"]["updated"];
}
return($r);
}
}
?>

View file

@ -68,8 +68,9 @@ if (!empty($r["regrinfo"]["domain"]["name"])) {
$r["regrinfo"]["domain"]["changed"]=$r["regrinfo"]["domain"]["changed"][0];
$r["regrinfo"]["domain"]["created"]=$r["regrinfo"]["domain"]["created"][0];
$r["regyinfo"]=array("whois"=>"whois.nic.ch","referrer"=>"www.nic.ch",
"registrar"=>"SWITCH Domain Name Registration");
$r["regyinfo"]=array("whois"=>"whois.nic.ch",
"referrer"=>"http://www.nic.ch",
"registrar"=>"SWITCH Domain Name Registration");
$r["regrinfo"]["registered"]="yes";
}
else { $r="";

View file

@ -72,7 +72,7 @@ $r["rawdata"]=$data_str["rawdata"];
$r["regrinfo"]=generic_whois($data_str["rawdata"],$items);
$r["regyinfo"]=array( "whois"=>"whois.cira.ca",
"referrer"=>"www.easydns.ca" );
"referrer"=>"http://www.easydns.ca" );
$r["regyinfo"]["registrar"]=$r["regrinfo"]["registrar"];
unset($r["regrinfo"]["registrar"]);

View file

@ -135,7 +135,7 @@ class denic extends Whois {
$r["regyinfo"] = array( "whois" => "whois.denic.de",
"registrar" => "DENIC eG",
"referer" => "http://www.denic.de/");
"referrer" => "http://www.denic.de/");
if (isset($disclaimer)) $r["regrinfo"]["disclaimer"]=$disclaimer;
return($r);

View file

@ -69,7 +69,7 @@ class esnic extends Whois {
$r["rawdata"] = $data_str["rawdata"];
$r["regyinfo"] = array("whois"=>"www.nic.es",
"referrer"=>"www.nic.es",
"referrer"=>"http://www.nic.es",
"registrar"=>"ES-NIC" );
$rw = generic_whois($data_str["rawdata"],$translate,$contacts);

View file

@ -101,7 +101,7 @@ class info extends Whois {
$r["rawdata"] = $data_str["rawdata"];
$r["regyinfo"] = array("whois"=>"whois.afilias.info",
"referrer"=>"whois.afilias.info",
"referrer"=>"http://whois.afilias.info",
"registrar"=>"Afilias Global Registry Services" );
$r["regrinfo"] = generic_whois($data_str["rawdata"],$items);

View file

@ -74,7 +74,7 @@ class lunic extends Whois {
$r["rawdata"] = $data_str["rawdata"];
$r["regyinfo"] = array("whois"=>"whois.dns.lu",
"referrer"=>"www.dns.lu",
"referrer"=>"http://www.dns.lu",
"registrar" => "DNS-LU");
$r["regrinfo"] = generic_whois ($data_str["rawdata"],$items);
return($r);

View file

@ -95,7 +95,7 @@ function parse ($data_str) {
$r["regrinfo"] = generic_whois($data_str["rawdata"],$items);
$r["regyinfo"] = array( "whois"=>"whois.neulevel.biz",
"referrer"=>"www.neulevel.biz",
"referrer"=>"http://www.neulevel.biz",
"registrar" => "NEULEVEL" );
return($r);

View file

@ -51,7 +51,7 @@ class nicse extends Whois {
$r["regyinfo"]=array(
"whois"=>"whois.nic-se.se",
"referrer"=>"www.nic-se.se",
"referrer"=>"http://www.nic-se.se",
"registrar" => "NIC-SE"
);

View file

@ -57,7 +57,7 @@ function parse ($data)
$r["rawdata"]=$data["rawdata"];
$r["regyinfo"]["whois"]="whois.domain-registry.nl";
$r["regyinfo"]["referrer"]="www.domain-registry.nl";
$r["regyinfo"]["referrer"]="http://www.domain-registry.nl";
$r["regyinfo"]["registrar"]="Stichting Internet Domeinregistratie NL";
$r["regrinfo"] = get_blocks($data["rawdata"],$items);

View file

@ -52,7 +52,7 @@ class nunames extends Whois {
$r["regyinfo"] = array(
"whois"=>"whois.nic.nu",
"referrer"=>"www.nunames.nu",
"referrer"=>"http://www.nunames.nu",
"registrar"=>".NU Domain, Ltd"
);

View file

@ -88,7 +88,7 @@ class uknic extends Whois {
}
$r["regyinfo"]["whois"]="whois.nic.uk";
$r["regyinfo"]["referrer"]="www.nic.uk";
$r["regyinfo"]["referrer"]="http://www.nic.uk";
$r["regyinfo"]["registrar"]="Nominet UK";
if (!empty($r["regrinfo"]["domain"]["name"])) {