phpWhois.org/cnnic.whois
2003-09-08 17:53:45 +00:00

97 lines
3.7 KiB
Text

<?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.
*/
/* 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);
require_once("generic2.whois");
class cnnic extends Whois {
function cnnic($data) {
$this->result = $this->parse($data);
}
function parse($data_str) {
$items = array(
"domain.name" => "Domain Name:",
"domain.status" => "Domain Status:",
"domain.nserver." => "Name Server:",
"domain.created" => "Registration Date:",
"domain.expires" => "Expiration Date:",
"domain.sponsor" => "Sponsoring Registrar:",
"owner.name" => "Registrant Name:",
"owner.organization" => "Registrant Organization:",
"owner.address.address" => "Registrant Address:",
"owner.address.zcode" => "Registrant Postal Code:",
"owner.address.city" => "Registrant City:",
"owner.address.country" => "Registrant Country Code:",
"owner.email" => "Registrant Email:",
"owner.phone" => "Registrant Phone Number:",
"owner.fax" => "Registrant Fax:",
"admin.name" => "Administrative Name:",
"admin.organization" => "Administrative Organization:",
"admin.address.address" => "Administrative Address:",
"admin.address.zcode" => "Administrative Postal Code:",
"admin.address.city" => "Administrative City:",
"admin.address.country" => "Administrative Country Code:",
"admin.email" => "Administrative Email:",
"admin.phone" => "Administrative Phone Number:",
"admin.fax" => "Administrative Fax:",
"tech.name" => "Technical Name:",
"tech.organization" => "Technical Organization:",
"tech.address.address" => "Technical Address:",
"tech.address.zcode" => "Technical Postal Code:",
"tech.address.city" => "Technical City:",
"tech.address.country" => "tec-country:",
"tech.email" => "Technical Email:",
"tech.phone" => "Technical Phone Number:",
"tech.fax" => "Technical Fax",
"billing.name" => "Billing Name:",
"billing.organization" => "Billing Organization:",
"billing.address.address" => "Billing Address:",
"billing.address.zcode" => "Billing Postal Code:",
"billing.address.city" => "Billing City:",
"billing.address.country" => "Billing Country Code:",
"billing.email" => "Billing Email:",
"billing.phone" => "Billing Phone Number:",
"billing.fax" => "Billing Fax:"
);
$r["rawdata"] = $data_str["rawdata"];
$r["regyinfo"] = array("whois"=>"whois.cnnic.net.cn",
"referrer"=>"http://www.cnnic.net.cn",
"registrar" => "China NIC");
$r["regrinfo"] = generic_whois ($data_str["rawdata"],$items);
return($r);
}
}
?>