lots of changes

This commit is contained in:
sparc 2009-12-29 11:34:51 +00:00
parent 76790ebab4
commit db9a8fbd9d
58 changed files with 515 additions and 832 deletions

View file

@ -1,5 +1,36 @@
200(/08/20
- added handler for .tel
- new easy_parser funtion applied to many handlers
- fixes for several handlers
- stargateinc handler moved to namevault
- itsyourdomain seems to be now tucows
- domainbank is now handled by dotster
- domaincontender is now assorted
- fixed bug #2888773 validip function uses undefined variable
- improved .eu domain registration status detection
- fixes for html nice output and utf-8 support
2008/10/10
- fixed Bugs item #2153003
- fixed bug #2153380 Bad info for joker.com domain owners
2008/09/07
- check network nserver too
- added suport for spanish dates
- fixed ws handler
2008/08/29
- fixed 'bold' regex and removed extra
blank lines in showHTML result
2008/08/28
- fixed namespace in whois.ip.lib.php
- allow to specify full url in showHTML result
2008/08/20
- added .ve handler by jlchafardet
- fixed some handlers reporting 'bill' instead of 'billing'
- added helper functions for some handlers
- fixed .au handler
2008/08/11
- fixed .es handler

View file

@ -156,6 +156,13 @@ and .tv domains and ip addresses this will prevent phpWhois to ask more
than one whois server, you will just know if the donmain is registered
or not and which is the registrar but not the owner information.
UTF-8
-----
PHPWhois will assume that all whois servers resturn UTF-8 encoded output,
if some whois server does not return UTF-8 data, you can include it in
the NON_UTF8 array in whois.servers.php
Notes
-----

View file

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
header('Content-Type: text/html; charset=UTF-8');
$out = implode("\n", file('example.html'));
$out = implode('', file('example.html'));
$out = str_replace('{self}', $_SERVER['PHP_SELF'], $out);
@ -109,7 +109,7 @@ if (isSet($_GET['query']))
}
}
$winfo = utf8_encode($winfo);
//$winfo = utf8_encode($winfo);
$resout = str_replace('{result}', $winfo, $resout);
}

View file

@ -40,7 +40,6 @@ class at_handler
function parse($data_str, $query)
{
$translate = array(
'fax-no' => 'fax',
'e-mail' => 'email',

View file

@ -48,12 +48,12 @@ class au_handler
'Status:' => 'domain.status',
'Domain ROID:' => 'domain.handle',
'Registrant:' => 'owner.organization',
'Registrant ID:' => 'owner.handle',
'Registrant Email:' => 'owner.email',
'Registrant Contact ID:' => 'owner.handle',
'Registrant Contact Email:' => 'owner.email',
'Registrant Contact Name:' => 'owner.name',
'Tech Name:' => 'tech.name',
'Tech Email:' => 'tech.email',
'Tech ID:' => 'tech.handle',
'Tech Contact Name:' => 'tech.name',
'Tech Contact Email:' => 'tech.email',
'Tech Contact ID:' => 'tech.handle',
'Name Server:' => 'domain.nserver.'
);

View file

@ -55,11 +55,8 @@ class be_handler
if (isset($r['regrinfo']['domain']['name']))
{
$r['regrinfo']['registered'] = 'yes';
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner']);
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin']);
$r['regrinfo'] = get_contacts($r['regrinfo']);
if (isset($r['regrinfo']['agent']))
{

View file

@ -56,9 +56,7 @@ class ch_handler
if (!empty($r['regrinfo']['domain']['name']))
{
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner']);
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
$r['regrinfo'] = get_contacts($r['regrinfo']);
$r['regrinfo']['domain']['name'] = $r['regrinfo']['domain']['name'][0];

View file

@ -197,6 +197,11 @@ class WhoisClient {
}
}
if (array_key_exists($this->Query['server'],$this->NON_UTF8))
{
$raw = utf8_encode($raw);
}
$output = explode("\n", $raw);
// Drop empty last line (if it's empty! - saleck)
@ -244,7 +249,7 @@ class WhoisClient {
else
$result['regyinfo']['servers'] = $servers;
// Handler may fortget to set rawdata
// Handler may forget to set rawdata
if (!isset($result['rawdata']))
$result['rawdata'] = $output;
}
@ -432,7 +437,7 @@ class WhoisClient {
// If the handler has still not been included, append to query errors list and return
if (!defined($HANDLER_FLAG))
{
$this->Query['errstr'][] = "Can't find ".$this->Query['tld'].' handler: '.$this->Query['file'];
$this->Query['errstr'][] = "Can't find $handler_name handler: ".$this->Query['file'];
return($result);
}

View file

@ -28,8 +28,8 @@ 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("__CN_HANDLER__"))
define("__CN_HANDLER__", 1);
if (!defined('__CN_HANDLER__'))
define('__CN_HANDLER__', 1);
require_once('whois.parser.php');
@ -39,55 +39,55 @@ class cn_handler
function parse($data_str, $query)
{
$items = array(
"Domain Name:" => "domain.name",
"Domain Status:" => "domain.status",
"Name Server:" => "domain.nserver.",
"Registration Date:" => "domain.created",
"Expiration Date:" => "domain.expires",
"Sponsoring Registrar:" => "domain.sponsor",
"Registrant Name:" => "owner.name",
"Registrant Organization:" => "owner.organization",
"Registrant Address:" => "owner.address.address",
"Registrant Postal Code:" => "owner.address.pcode",
"Registrant City:" => "owner.address.city",
"Registrant Country Code:" => "owner.address.country",
"Registrant Email:" => "owner.email",
"Registrant Phone Number:" => "owner.phone",
"Registrant Fax:" => "owner.fax",
"Administrative Name:" => "admin.name",
"Administrative Organization:" => "admin.organization",
"Administrative Address:" => "admin.address.address",
"Administrative Postal Code:" => "admin.address.pcode",
"Administrative City:" => "admin.address.city",
"Administrative Country Code:" => "admin.address.country",
"Administrative Email:" => "admin.email",
"Administrative Phone Number:" => "admin.phone",
"Administrative Fax:" => "admin.fax",
"Technical Name:" => "tech.name",
"Technical Organization:" => "tech.organization",
"Technical Address:" => "tech.address.address",
"Technical Postal Code:" => "tech.address.pcode",
"Technical City:" => "tech.address.city",
"tec-country:" => "tech.address.country",
"Technical Email:" => "tech.email",
"Technical Phone Number:" => "tech.phone",
"Technical Fax:" => "tech.fax",
"Billing Name:" => "billing.name",
"Billing Organization:" => "billing.organization",
"Billing Address:" => "billing.address.address",
"Billing Postal Code:" => "billing.address.pcode",
"Billing City:" => "billing.address.city",
"Billing Country Code:" => "billing.address.country",
"Billing Email:" => "billing.email",
"Billing Phone Number:" => "billing.phone",
"Billing Fax:" => "billing.fax"
'Domain Name:' => 'domain.name',
'Domain Status:' => 'domain.status',
'Name Server:' => 'domain.nserver.',
'Registration Date:' => 'domain.created',
'Expiration Date:' => 'domain.expires',
'Sponsoring Registrar:' => 'domain.sponsor',
'Registrant Name:' => 'owner.name',
'Registrant Organization:' => 'owner.organization',
'Registrant Address:' => 'owner.address.address',
'Registrant Postal Code:' => 'owner.address.pcode',
'Registrant City:' => 'owner.address.city',
'Registrant Country Code:' => 'owner.address.country',
'Registrant Email:' => 'owner.email',
'Registrant Phone Number:' => 'owner.phone',
'Registrant Fax:' => 'owner.fax',
'Administrative Name:' => 'admin.name',
'Administrative Organization:' => 'admin.organization',
'Administrative Address:' => 'admin.address.address',
'Administrative Postal Code:' => 'admin.address.pcode',
'Administrative City:' => 'admin.address.city',
'Administrative Country Code:' => 'admin.address.country',
'Administrative Email:' => 'admin.email',
'Administrative Phone Number:' => 'admin.phone',
'Administrative Fax:' => 'admin.fax',
'Technical Name:' => 'tech.name',
'Technical Organization:' => 'tech.organization',
'Technical Address:' => 'tech.address.address',
'Technical Postal Code:' => 'tech.address.pcode',
'Technical City:' => 'tech.address.city',
'tec-country:' => 'tech.address.country',
'Technical Email:' => 'tech.email',
'Technical Phone Number:' => 'tech.phone',
'Technical Fax:' => 'tech.fax',
'Billing Name:' => 'billing.name',
'Billing Organization:' => 'billing.organization',
'Billing Address:' => 'billing.address.address',
'Billing Postal Code:' => 'billing.address.pcode',
'Billing City:' => 'billing.address.city',
'Billing Country Code:' => 'billing.address.country',
'Billing Email:' => 'billing.email',
'Billing Phone Number:' => 'billing.phone',
'Billing Fax:' => 'billing.fax'
);
$r["regyinfo"] = array(
"referrer" => "http://www.cnnic.net.cn",
"registrar" => "China NIC"
$r['regyinfo'] = array(
'referrer' => 'http://www.cnnic.net.cn',
'registrar' => 'China NIC'
);
$r["regrinfo"] = generic_parser_b($data_str["rawdata"], $items, 'ymd');
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, 'ymd');
return ($r);
}
}

View file

@ -65,6 +65,7 @@ class de_handler
'city:' => 'address.city',
'pcode:' => 'address.pcode',
'country:' => 'address.country',
'organisation:' => 'organization',
'name:' => 'name',
'remarks:' => '',
'type:' => ''
@ -98,7 +99,6 @@ class de_handler
}
else
$r['regrinfo']['registered'] = 'no';
echo "<br/><br/>";
return $r;
}

View file

@ -47,32 +47,14 @@ class edu_handler
'billing' => 'Billing Contact:'
);
$b = get_blocks($data_str['rawdata'], $items);
if (isset($b['owner']))
{
$b['owner'] = get_contact($b['owner']);
}
if (isset($b['admin']))
{
$b['admin'] = get_contact($b['admin']);
}
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'dmy');
if (isset($b['tech']))
{
$b['tech'] = get_contact($b['tech']);
if ($b['tech']['name'] == 'Same as above')
$b['tech'] = $b['admin'];
if ($r['regrinfo']['tech']['name'] == 'Same as above')
$r['regrinfo']['tech'] = $r['regrinfo']['admin'];
}
if (isset($b['billing']))
$b['billing'] = get_contact($b['billing']);
format_dates($b, 'dmy');
$r['regrinfo'] = $b;
$r['regyinfo']['referrer'] = 'http://whois.educause.net';
$r['regyinfo']['registrar'] = 'EDUCASE';
return ($r);

View file

@ -64,7 +64,12 @@ class eu_handler
case 'APPLICATION PENDING':
$r['regrinfo']['registered'] = 'pending';
break;
default:
$r['regrinfo']['registered'] = 'unknown';
}
else
$r['regrinfo']['registered'] = 'yes';
if (isset($r['regrinfo']['tech']))
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech'],$extra);

View file

@ -42,34 +42,33 @@ class fm_handler
'owner' => 'Registrant',
'admin' => 'Administrative',
'tech' => 'Technical',
'billing' => 'Billing'
'billing' => 'Billing',
'domain.nserver' => 'Name Servers:',
'domain.created' => 'Created:',
'domain.expires' => 'Expires:',
'domain.changed' => 'Modified:',
'domain.status' => 'Status:',
'domain.sponsor' => 'Registrar:'
);
$blocks = get_blocks($data['rawdata'], $items);
$r['regrinfo'] = get_blocks($data['rawdata'], $items);
$items = array(
'FM Domain:' => 'name',
'Primary Hostname:' => 'nserver.0',
'Secondary Hostname:' => 'nserver.1',
'Renewal Date:' => 'expires'
);
$items = array( 'voice:' => 'phone' );
$r['regrinfo']['domain'] = generic_parser_b($data['rawdata'], $items);
$items = array(
'Organiztion:' => 'organization',
'Name:' => 'name',
'Address:' => 'address.0',
'City, State Zip:' => 'address.1',
'Country:' => 'address.country',
'Phone:' => 'phone',
'Fax:' => 'fax',
'Email:' => 'email'
);
while (list($key, $val) = each($blocks))
if (!empty($r['regrinfo']['domain']['created']))
{
$r['regrinfo'][$key] = generic_parser_b($val, $items, 'mdy', false);
$r['regrinfo'] = get_contacts($r['regrinfo'],$items);
if (count($r['regrinfo']['billing']['address']) > 4)
$r['regrinfo']['billing']['address'] = array_slice($r['regrinfo']['billing']['address'],0,4);
$r['regrinfo']['registered'] = 'yes';
format_dates($r['regrinfo']['domain'],'dmY');
}
else
{
$r = '';
$r['regrinfo']['registered'] = 'no';
}
$r['regyinfo']['referrer'] = 'http://www.dot.dm';

View file

@ -45,12 +45,7 @@ class alldomains_handler
'domain.nserver.' => 'Domain servers in listed order:'
);
$r = get_blocks($data_str, $items);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
format_dates($r, 'ymd');
return ($r);
return easy_parser($data_str, $items, 'ymd');
}
}
?>

View file

@ -49,12 +49,7 @@ class ascio_handler
'domain.changed' => 'Record last updated:'
);
$r = get_blocks($data_str, $items, true);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
format_dates($r, 'ymd');
return ($r);
return easy_parser($data_str, $items, 'ymd',false,false,true);
}
}
?>

View file

@ -25,12 +25,12 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
if (!defined('__DOMAINCONTENDER_HANDLER__'))
define('__DOMAINCONTENDER_HANDLER__', 1);
if (!defined('__ASSORTED_HANDLER__'))
define('__ASSORTED_HANDLER__', 1);
require_once('whois.parser.php');
class domaincontender_handler
class assorted_handler
{
function parse($data_str, $query)
{
@ -45,12 +45,7 @@ class domaincontender_handler
'domain.changed' => 'Record last updated'
);
$r = get_blocks($data_str, $items, true);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
format_dates($r, 'ymd');
return ($r);
return easy_parser($data_str, $items, 'ymd',false,false,true);
}
}
?>

View file

@ -49,13 +49,7 @@ class directnic_handler
'' => 'By submitting a WHOIS query'
);
$r = get_blocks($data_str, $items, true);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
format_dates($r, 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy',false,false,true);
}
}
?>

View file

@ -47,14 +47,7 @@ class domaindiscover_handler
'domain.expires' => 'Domain expires on'
);
$r = get_blocks($data_str, $items, true);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
$r['zone'] = get_contact($r['zone']);
format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy', false, false, true);
}
}

View file

@ -29,38 +29,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* 17/1/2002 Fixed !! */
/* 2003/02/18 updated to common object model */
if (!defined("__DOTSTER_HANDLER__"))
define("__DOTSTER_HANDLER__", 1);
if (!defined('__DOTSTER_HANDLER__'))
define('__DOTSTER_HANDLER__', 1);
require_once('whois.parser.php');
class dotster_handler
{
function parse($data_str, $query)
{
$items = array(
"owner" => "Registrant:",
"admin" => "Administrative",
"tech" => "Technical",
"domain.nserver" =>
"Domain servers in listed order:",
"domain.name" => "Domain name:",
"domain.created" => "Created on:",
"domain.expires" => "Expires on:",
"domain.changed" => "Last Updated on:",
"domain.sponsor" => "Registrar:"
'owner' => 'Registrant:',
'admin' => 'Administrative',
'tech' => 'Technical',
'domain.nserver' =>
'Domain servers in listed order:',
'domain.name' => 'Domain name:',
'domain.created' => 'Created on:',
'domain.expires' => 'Expires on:',
'domain.changed' => 'Last Updated on:',
'domain.sponsor' => 'Registrar:'
);
$r = get_blocks($data_str, $items);
$r["owner"] = get_contact($r["owner"]);
$r["admin"] = get_contact($r["admin"]);
$r["tech"] = get_contact($r["tech"]);
format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy');
}
}
?>

View file

@ -62,22 +62,7 @@ class enom_handler
'domain.expires#2' => 'Registered through-'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner'],false,true);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin'],false,true);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech'],false,true);
if (isset($r['billing']))
$r['billing'] = get_contact($r['billing'],false,true);
$r = format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy', false, false, true);
}
}

View file

@ -40,37 +40,22 @@ class fabulous_handler
'owner' => 'Domain '.$query.':',
'admin' => 'Administrative contact:',
'tech' => 'Technical contact:',
'bill' => 'Billing contact:',
'billing' => 'Billing contact:',
'' => 'Record dates:'
);
$r = get_blocks($data_str, $items, true);
$r = easy_parser($data_str, $items, 'mdy',false,false,true);
if (isset($r['bill']))
if (!isset($r['tech']))
{
$r['bill'] = get_contact($r['bill']);
$r['tech'] = $r['billing'];
}
if (isset($r['tech']))
{
$r['tech'] = get_contact($r['tech']);
}
else
{
$r['tech'] = $r['bill'];
}
if (isset($r['admin']))
{
$r['admin'] = get_contact($r['admin']);
}
else
if (!isset($r['admin']))
{
$r['admin'] = $r['tech'];
}
$r['owner'] = get_contact($r['owner']);
format_dates($r, 'mdy');
return ($r);
}
}

View file

@ -35,10 +35,8 @@ require_once('whois.parser.php');
class interdomain_handler
{
function parse($data_str, $query)
{
$items = array(
'Domain Name................' => 'domain.name',
'Creation Date............' => 'domain.created',
@ -82,5 +80,4 @@ class interdomain_handler
return generic_parser_b($data_str, $items, 'dmy');
}
}
?>

View file

@ -48,13 +48,7 @@ class itsyourdomain_handler
'domain.changed' => 'Record last updated on '
);
$r = get_blocks($data_str, $items);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
$r['billing'] = get_contact($r['billing']);
$r = format_dates($r, 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy');
}
}
?>

View file

@ -27,8 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* moniker.whois 1.1 David Saez Padros <david@ols.es> */
if (!defined("__MONIKER_HANDLER__"))
define("__MONIKER_HANDLER__", 1);
if (!defined('__MONIKER_HANDLER__'))
define('__MONIKER_HANDLER__', 1);
require_once('whois.parser.php');
@ -39,24 +39,18 @@ class moniker_handler
{
$items = array(
"owner" => "Registrant",
"admin" => "Administrative ",
"tech" => "Technical ",
"billing" => "Billing ",
"domain.name" => "Domain Name:",
"domain.nserver." => "Domain servers in listed order:",
"domain.created" => "Record created on: ",
"domain.expires" => "Domain Expires on: ",
"domain.changed" => "Database last updated on: "
'owner' => 'Registrant',
'admin' => 'Administrative ',
'tech' => 'Technical ',
'billing' => 'Billing ',
'domain.name' => 'Domain Name:',
'domain.nserver.' => 'Domain servers in listed order:',
'domain.created' => 'Record created on: ',
'domain.expires' => 'Domain Expires on: ',
'domain.changed' => 'Database last updated on: '
);
$r = get_blocks($data_str, $items);
$r["owner"] = get_contact($r["owner"]);
$r["admin"] = get_contact($r["admin"]);
$r["tech"] = get_contact($r["tech"]);
$r["billing"] = get_contact($r["billing"]);
$r = format_dates($r, 'ymd');
return ($r);
return easy_parser($data_str, $items, 'ymd');
}
}
?>

View file

@ -34,7 +34,6 @@ require_once('whois.parser.php');
class namejuice_handler
{
function parse($data_str, $query)
{
@ -46,23 +45,12 @@ class namejuice_handler
'domain.nserver.' => 'Name Servers:',
'domain.created' => 'Creation date:',
'domain.expires' => 'Expiration date:',
'domain.changed' => 'Update date:',
'domain.status' => 'Status:',
'domain.sponsor' => 'Registration Service Provided By:'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner'],false,true);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin'],false,true);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech'],false,true);
$r = format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy', false, true, true);
}
}
?>

View file

@ -32,15 +32,13 @@ require_once('whois.parser.php');
class nameking_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant',
'admin' => 'Admin Contact',
'tech' => 'Tech Contact',
'bill' => 'Billing Contact',
'billing' => 'Billing Contact',
'domain.sponsor' => 'Registration Provided By:',
'domain.created' => 'Creation Date:',
'domain.expires' => 'Expiration Date:',
@ -66,21 +64,7 @@ class nameking_handler
'city, province, post code:' => 'address.city'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner'],$extra);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin'],$extra);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech'],$extra);
if (isset($r['bill']))
$r['bill'] = get_contact($r['bill'],$extra);
format_dates($r['domain'], 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy', $extra, false, true);
}
}
?>

View file

@ -27,20 +27,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* stargate.whois 1.1 David Saez Padros <david@ols.es> */
if (!defined('__STARGATEINC_HANDLER__'))
define('__STARGATEINC_HANDLER__', 1);
if (!defined('__NAMEVAULT_HANDLER__'))
define('__NAMEVAULT_HANDLER__', 1);
require_once('whois.parser.php');
class stargateinc_handler
class namevault_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant',
'admin' => 'Administrative',
'tech' => 'Technical',
'billing' => 'Billing',
'admin' => 'Administrative Contact:',
'tech' => 'Technical Contact:',
'billing' => 'Billing Contact:',
'domain.name' => 'Domain Name:',
'domain.nserver.' => 'Name Servers',
'domain.created' => 'Creation Date:',
@ -48,13 +48,7 @@ class stargateinc_handler
'domain.status' => 'Status:'
);
$r = get_blocks($data_str, $items,true);
$r['owner'] = get_contact($r['owner'],false,true);
$r['admin'] = get_contact($r['admin'],false,true);
$r['tech'] = get_contact($r['tech'],false,true);
$r['billing'] = get_contact($r['billing'],false,true);
$r = format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy', false, true, true);
}
}
?>

View file

@ -47,15 +47,7 @@ class networksolutions_handler
'domain.expires' => 'Record expires on'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner'],false,true);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin'],false,true);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech'],false,true);
$r = format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy',false,true,true);
}
}
?>

View file

@ -51,14 +51,7 @@ class nicline_handler
'domain.changed' => 'Last updated:'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner']);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin']);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech']);
$r = format_dates($r, 'dmy');
return ($r);
return easy_parser($data_str, $items, 'dmy');
}
}
?>

View file

@ -40,7 +40,7 @@ class onlinenic_handler
'owner' => 'Registrant:',
'admin' => 'Administrator:',
'tech' => 'Technical Contactor:',
'bill' => 'Billing Contactor:',
'billing' => 'Billing Contactor:',
'domain.name' => 'Domain name:',
'domain.name#' => 'Domain Name:',
'domain.nserver' => 'Domain servers in listed order:',
@ -67,16 +67,7 @@ class onlinenic_handler
',country:' => 'address.country'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner'],$extra);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin'],$extra);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech'],$extra);
if (isset($r['bill']))
$r['bill'] = get_contact($r['bill'],$extra);
$r = easy_parser($data_str, $items, 'mdy',$extra,false,true);
foreach($r as $key => $part)
if (isset($part['email']))
@ -87,7 +78,7 @@ class onlinenic_handler
$r[$key]['email'] = $email;
if ($phone != '') $r[$key]['phone'] = $phone;
}
format_dates($r['domain'], 'mdy');
return ($r);
}

View file

@ -50,15 +50,11 @@ class opensrs_handler
'domain.sponsor' => 'Registrar of Record:'
);
$r = get_blocks($data_str, $items, true);
$r = easy_parser($data_str, $items, 'dmy', false, false, true);
if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor']))
$r['domain']['sponsor'] = $r['domain']['sponsor'][0];
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner']);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin']);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech']);
$r = format_dates($r, 'dmy');
return ($r);
}
}

View file

@ -46,15 +46,7 @@ class ovh_handler
'domain.created' => 'Record created on'
);
$r = get_blocks($data_str, $items, true);
$r['owner'] = get_contact($r['owner']);
$r['admin'] = get_contact($r['admin']);
$r['tech'] = get_contact($r['tech']);
$r['billing'] = get_contact($r['billing']);
format_dates($r, 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy',false,false,true);
}
}
?>

View file

@ -51,13 +51,7 @@ class publicdomainregistry_handler
'domain.expires#' => 'Expiration Date:'
);
$r = get_blocks($data_str, $items,true);
$r['owner'] = get_contact($r['owner'],false,true);
$r['admin'] = get_contact($r['admin'],false,true);
$r['tech'] = get_contact($r['tech'],false,true);
format_dates($r, 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy', false, true, true);
}
}
?>

View file

@ -57,15 +57,7 @@ class register_handler
'domain.status' => 'Status:'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner']);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin']);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech']);
if (isset($r['zone'])) $r['zone'] = get_contact($r['zone']);
$r = format_dates($r, '-mdy');
return ($r);
return easy_parser($data_str, $items, 'ymd');
}
}
?>

View file

@ -34,10 +34,8 @@ require_once('whois.parser.php');
class srsplus_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant:',
'admin' => 'Administrative',
@ -49,20 +47,7 @@ class srsplus_handler
'domain.expires' => 'Record expires on'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner'],false,true);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin'],false,true);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech'],false,true);
if (isset($r['billing']))
$r['billing'] = get_contact($r['billing'],false,true);
format_dates($r['domain'], 'mdy');
return ($r);
return easy_parser($data_str, $items, 'ymd',false,true,true);
}
}
?>

View file

@ -48,13 +48,7 @@ class tmagnic_handler
'#' => 'Punycode Name:'
);
$r = get_blocks($data_str, $items, true);
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner']);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin']);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech']);
format_dates($r, 'ymd');
return ($r);
return easy_parser($data_str, $items, 'ymd',false,false,true);
}
}
?>

View file

@ -34,10 +34,8 @@ require_once('whois.parser.php');
class tvcorp_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant',
'admin' => 'Admin',
@ -48,15 +46,7 @@ class tvcorp_handler
'domain.expires' => 'Record expires on'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner'])) $r['owner'] = get_contact($r['owner']);
if (isset($r['admin'])) $r['admin'] = get_contact($r['admin']);
if (isset($r['tech'])) $r['tech'] = get_contact($r['tech']);
if (isset($r['billing'])) $r['billing'] = get_contact($r['billing']);
$r = format_dates($r, 'myd');
return ($r);
return easy_parser($data_str, $items, 'mdy');
}
}
?>

View file

@ -32,10 +32,8 @@ require_once('whois.parser.php');
class wildwestdomains_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant:',
'admin' => 'Administrative Contact:',
@ -48,19 +46,7 @@ class wildwestdomains_handler
'domain.changed' => 'Last Updated on:'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner']);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin']);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech']);
format_dates($r['domain'], 'mdy');
return ($r);
return easy_parser($data_str, $items, 'mdy');
}
}
?>

View file

@ -43,8 +43,7 @@ class hu_handler {
'e-mail' => 'email',
'hun-id' => 'handle',
'person' => 'name',
'domain_pri_ns' => 'nserver',
'domain_sec_ns' => 'nserver',
'nameserver' => 'nserver',
'person' => 'name',
'org' => 'organization',
'registered' => 'created'
@ -55,72 +54,44 @@ class hu_handler {
'admin-c' => 'admin',
'tech-c' => 'tech',
'billing-c' => 'billing',
'zone-c' => 'zone'
'zone-c' => 'zone',
'owner-hun-id' => 'owner'
);
// make those broken hungary comments standards-conforming
for ($i=1; $i<count($data_str['rawdata']); $i++) {
if (substr($data_str['rawdata'][$i+1],0,7) != 'domain:') {
$data_str['rawdata'][$i] = '% '.$data_str['rawdata'][$i];
}
else {
break;
}
}
// replace first found hun-id with owner-hun-id (will be parsed later on)
// make output UTF-8
for ($i=1; $i<count($data_str['rawdata']); $i++) {
$comments = true;
$owner_id = true;
if (substr($data_str['rawdata'][$i],0,7) == 'hun-id:') {
foreach ($data_str['rawdata'] as $i => $val)
{
if ($comments)
{
if (strpos($data_str['rawdata'][$i],'domain:') === false)
{
if ($i) $data_str['rawdata'][$i] = '% '.$data_str['rawdata'][$i];
}
else
$comments = false;
}
else
if ($owner_id && substr($data_str['rawdata'][$i],0,7) == 'hun-id:')
{
$data_str['rawdata'][$i] = 'owner-'.$data_str['rawdata'][$i];
break;
$owner_id = false;
}
$data_str['rawdata'][$i] = utf8_encode($data_str['rawdata'][$i]);
}
$reg = generic_parser_a($data_str['rawdata'],$translate,$contacts);
if ($reg['domain']) {
while (list($key,$val)=each($reg['domain']))
{
if (is_array($val)) continue;
$v=trim(substr(strstr($val,':'),1));
if ($key == 'organization')
{
$reg['owner']['organization']=$val;
unset($reg['domain'][$key]);
continue;
}
if ($key == 'owner-hun-id')
{
$reg['owner']['handle']=$val;
unset($reg['domain'][$key]);
continue;
}
if ($key == 'address')
{
$reg['owner']['address']=$val;
unset($reg['domain'][$key]);
continue;
}
if ($key == 'phone')
{
$reg['owner']['phone']=$val;
unset($reg['domain'][$key]);
continue;
}
if ($key == 'fax')
{
$reg['owner']['fax']=$val;
unset($reg['domain'][$key]);
continue;
}
}
}
unset($reg['domain']['organization']);
unset($reg['domain']['address']);
unset($reg['domain']['phone']);
unset($reg['domain']['fax']);
$r['regrinfo'] = $reg;
$r['regyinfo'] = array('referrer'=>'http://www.nic.hu','registrar'=>'HUNIC');

View file

@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* 200.165.206.74 (brnic) */
/* 210.178.148.129 (krnic) */
/* 200.44.33.31 (lacnic) */
/* 210.255.180.14 (jpnic) */
if (!defined('__IP_HANDLER__'))
define('__IP_HANDLER__', 1);
@ -80,8 +81,6 @@ class ip_handler extends WhoisClient
$this->Query['server'] = 'whois.arin.net';
$this->Query['query'] = $query;
reset($this->REGISTRARS);
$rawdata = $data['rawdata'];
if (empty($rawdata)) return $result;
@ -91,7 +90,8 @@ class ip_handler extends WhoisClient
if ($orgname == '')
$orgname = trim($rawdata[1]);
while (list($string, $whois) = each($this->REGISTRARS))
foreach($this->REGISTRARS as $string => $whois)
if (strstr($orgname, $string) != '')
{
$this->Query['server'] = $whois;
@ -120,6 +120,15 @@ class ip_handler extends WhoisClient
$rawdata = $this->GetRawData($query);
break;
}
if (strstr($line, 'Japan Network Information Center'))
{
$result = $this->set_whois_info($result);
$this->Query['server'] = 'whois.nic.ad.jp';
$result['regyinfo']['registrar'] = 'Japan Network Information Center';
$rawdata = $this->GetRawData($query.'/e');
break;
}
}
break;
@ -150,7 +159,6 @@ class ip_handler extends WhoisClient
if ($newquery != '')
{
//$result = $this->set_whois_info($result);
$result['regyinfo']['netname'] = $newquery;
if (strstr($newquery, 'BRAZIL-BLK'))

View file

@ -61,16 +61,7 @@ class it_handler
'last update:' => 'changed'
);
$r['regrinfo'] = get_blocks($data_str['rawdata'], $items);
if (isset($r['regrinfo']['owner']))
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner'], $extra);
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin'], $extra);
if (isset($r['regrinfo']['tech']))
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech'], $extra);
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd',$extra);
if (isset($r['regrinfo']['registrar']))
{
@ -83,13 +74,6 @@ class it_handler
'referrer' => 'http://www.nic.it/'
);
/*
if (isset($r['regrinfo']['domain']))
$r['regrinfo']['domain']['changed'] = substr($r['regrinfo']['domain']['changed'], 0, 10);
else
$r['regrinfo']['registered'] = 'no';
*/
$r = format_dates($r, 'ymd');
return ($r);
}
}

View file

@ -54,18 +54,7 @@ class lt_handler
'' => '%'
);
$r['regrinfo'] = get_blocks($data_str['rawdata'], $items);
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin'],$translate);
if (isset($r['regrinfo']['tech']))
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech'],$translate);
if (isset($r['regrinfo']['zone']))
$r['regrinfo']['zone'] = get_contact($r['regrinfo']['zone'],$translate);
$r = format_dates($r,'ymd');
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $translate);
$r['regyinfo'] = array(
'referrer' => 'http://www.domreg.lt',

View file

@ -38,91 +38,36 @@ class mx_handler
function parse($data_str, $query)
{
$contacts = array(
'admin' => 'ADMINISTRATIVO',
'tech' => 'TECNICO',
'billing' => 'DE PAGO'
);
$items = array(
'name' => 'DOMINIO:',
'created' => 'FECHA DE CREACION:',
'changed' => 'FECHA DE ULTIMA MODIFICACION:'
'owner' => 'Registrant:',
'admin' => 'Administrative Contact:',
'tech' => 'Technical Contact:',
'billing' => 'Billing Contact:',
'domain.nserver' => 'Name Servers:',
'domain.created' => 'Created On:',
'domain.expires' => 'Expiration Date:',
'domain.changed' => 'Last Updated On:',
'domain.sponsor' => 'Registrar:'
);
$r['regrinfo'] = array();
$r['regrinfo']['domain']['nserver'] = array();
$r['regrinfo']['admin'] = array();
$r['regrinfo']['tech'] = array();
$r['regrinfo']['billing'] = array();
$r['regrinfo']['owner'] = array();
$extra = array(
'city:' => 'address.city',
'state:' => 'address.state',
'dns:' => '0'
);
$lastk = '';
$r['regrinfo'] = easy_parser($data_str['rawdata'],$items,'dmy',$extra);
while (list($key, $val) = each($data_str['rawdata']))
{
$val = trim($val);
if ($val != '')
{
foreach($contacts as $key => $contact)
{
if (strstr($val, "CONTACTO $contact:"))
{
preg_match("/CONTACTO $contact:\s*(.+?)\s*\[(.+?)\]/", $val, $refs);
$r['regrinfo'][$key]['name'] = $refs[1];
$r['regrinfo'][$key]['handle'] = $refs[2];
$lastk = $key;
break;
}
}
if (strstr($val, 'ORGANIZACION:'))
{
preg_match('/ORGANIZACION:\s*(.+?)\s*\[(.+?)\]/', $val, $refs);
$r['regrinfo']['owner']['name'] = $refs[1];
$r['regrinfo']['owner']['handle'] = $refs[2];
continue;
}
if (strstr($val, 'SERVIDOR DNS '))
{
$r['regrinfo']['domain']['nserver'][] = trim(substr($val, 16));
continue;
}
if (strstr($val, 'DOMICILIO:'))
{
if ($lastk == '') $lastk = 'owner';
$r['regrinfo'][$lastk]['address'] = trim(substr($val, 11));
continue;
}
reset($items);
while (list($field, $match) = each($items))
if (strstr($val, $match))
{
$r['regrinfo']['domain'][$field] = trim(substr($val, strlen($match)));
break;
}
}
}
if (!empty($r['regrinfo']['owner']['name']))
{
$r['regyinfo'] = array(
'referrer' => 'http://www.nic.mx',
'registrar' => 'NIC-Mexico'
'registrar' => 'NIC Mexico',
'referrer' => 'http://www.nic.mx/'
);
}
else
$r = '';
format_dates($r, 'dmy');
if (empty($r['regrinfo']['domain']['created']))
$r['regrinfo']['registered'] = 'no';
else
$r['regrinfo']['registered'] = 'yes';
return ($r);
}

View file

@ -54,7 +54,6 @@ class nl_handler
);
$r['regrinfo'] = get_blocks($data['rawdata'], $items);
$r['regyinfo']['referrer'] = 'http://www.domain-registry.nl';
$r['regyinfo']['registrar'] = 'Stichting Internet Domeinregistratie NL';
@ -64,11 +63,18 @@ class nl_handler
return $r;
}
if (isset($r['regrinfo']['tech']))
$r['regrinfo']['tech'] = $this->get_contact($r['regrinfo']['tech']);
$r['regrinfo']['owner'] = $this->get_contact($r['regrinfo']['owner']);
$r['regrinfo']['admin'] = $this->get_contact($r['regrinfo']['admin']);
if (isset($r['regrinfo']['zone']))
$r['regrinfo']['zone'] = $this->get_contact($r['regrinfo']['zone']);
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = $this->get_contact($r['regrinfo']['admin']);
if (isset($r['regrinfo']['owner']))
$r['regrinfo']['owner'] = $this->get_contact($r['regrinfo']['owner']);
$r['regrinfo']['registered'] = 'yes';
format_dates($r, 'dmy');

View file

@ -53,11 +53,7 @@ class org_za_handler
{
$r['regrinfo']['registered'] = 'yes';
$r['regrinfo']['domain']['handler'] = strtok(array_shift($r['regrinfo']['owner']),' ');
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner']);
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin']);
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
$r['regrinfo']['billing'] = get_contact($r['regrinfo']['billing']);
$r['regrinfo'] = get_contacts($r['regrinfo']);
}
else
$r['regrinfo']['registered'] = 'no';
@ -65,7 +61,6 @@ class org_za_handler
$r['regyinfo']['referrer'] = 'http://www.org.za';
$r['regyinfo']['registrar'] = 'The ORG.ZA Domain';
$r['rawdata'] = $data['rawdata'];
return ($r);
}
}

View file

@ -232,13 +232,14 @@ while (list($key,$val) = each($rawdata))
$found = false;
reset($items);
while (list($field, $match) = each($items)) {
while (list($field, $match) = each($items))
{
$pos = strpos($val,$match);
if ($field != '' && $pos !== false) {
if ($val == $match) {
if ($field != '' && $pos !== false)
{
if ($val == $match)
{
$found = true;
$endtag = '';
$line = $val;
@ -247,13 +248,15 @@ while (list($key,$val) = each($rawdata))
$last = substr($val,-1,1);
if ($last == ':' || $last == '-' || $last == ']') {
if ($last == ':' || $last == '-' || $last == ']')
{
$found = true;
$endtag = $last;
$line = $val;
break;
}
else {
else
{
$var = getvarname(strtok($field,'#'));
$itm = trim(substr($val,$pos+strlen($match)));
eval('$r'.$var.'=$itm;');
@ -313,11 +316,14 @@ while (list($key,$val) = each($rawdata))
if (empty($block)) continue;
while (list($field, $match)=each($items)) {
while (list($field, $match)=each($items))
{
$pos = strpos($line,$match);
if ($pos!==false) {
if ($pos !== false)
{
$var = getvarname(strtok($field,'#'));
eval('$r'.$var.'=$block;');
if ($var != '[]') eval('$r'.$var.'=$block;');
}
}
}
@ -327,19 +333,33 @@ return $r;
//-------------------------------------------------------------------------
function easy_parser($data_str, $items, $date_format, $translate = false ,
$has_org = false, $partial_match = false )
{
$r = get_blocks($data_str, $items, $partial_match);
$r = get_contacts($r, $translate, $has_org);
format_dates($r, $date_format);
return $r;
}
//-------------------------------------------------------------------------
function get_contacts ( $array, $extra_items='', $has_org= false )
{
if (isset($array['billing']))
$array['billing'] = get_contact($array['billing']);
$array['billing'] = get_contact($array['billing'], $extra_items, $has_org);
if (isset($array['tech']))
$array['tech'] = get_contact($array['tech']);
$array['tech'] = get_contact($array['tech'], $extra_items, $has_org);
if (isset($array['zone']))
$array['zone'] = get_contact($array['zone'], $extra_items, $has_org);
if (isset($array['admin']))
$array['admin'] = get_contact($array['admin']);
$array['admin'] = get_contact($array['admin'], $extra_items, $has_org);
if (isset($array['owner']))
$array['owner'] = get_contact($array['owner']);
$array['owner'] = get_contact($array['owner'], $extra_items, $has_org);
return $array;
}
@ -542,8 +562,9 @@ return $res;
function get_date($date,$format)
{
$months = array( 'jan'=>1, 'feb'=>2, 'mar'=>3, 'apr'=>4, 'may'=>5, 'jun'=>6,
'jul'=>7, 'aug'=>8, 'sep'=>9, 'oct'=>10, 'nov'=>11, 'dec'=>12 );
$months = array( 'jan'=>1, 'ene'=>1, 'feb'=>2, 'mar'=>3, 'apr'=>4, 'abr'=>4,
'may'=>5, 'jun'=>6, 'jul'=>7, 'aug'=>8, 'ago'=>8, 'sep'=>9,
'oct'=>10, 'nov'=>11, 'dec'=>12, 'dic'=>12 );
$parts = explode(' ',$date);

View file

@ -32,39 +32,62 @@ if (!defined('__PRO_HANDLER__'))
class pro_handler
{
function parse($data, $query)
{
$items = array(
'domain.name' => 'Domain name:',
'domain.status' => 'Domain statuses:',
'domain.nserver' => 'Domain servers in listed order:',
'domain.created' => 'Creation date:',
'domain.expires' => 'Expiration date:',
'domain.changed' => 'Last updated:',
'domain.sponsor' => 'Registrar:',
'owner' => 'Registrant Contact:',
'admin' => 'Administrative Contact:',
'tech' => 'Technical Contact:'
'Domain Name:' => 'domain.name',
'Domain ID:' => 'domain.handle',
'Status:' => 'domain.status',
'Name Server:' => 'domain.nserver.',
'Created On:' => 'domain.created',
'Last Updated On:' => 'domain.changed',
'Expiration Date:' => 'domain.expires',
'Sponsoring Registrar:' => 'domain.sponsor',
'Registrant Name:' => 'owner.name',
'Registrant ID:' => 'owner.handle',
'Registrant Street1:' => 'owner.address.address.0',
'Registrant Street2:' => 'owner.address.address.1',
'Registrant Street3:' => 'owner.address.address.2',
'Registrant Postal Code:' => 'owner.address.pcode',
'Registrant City:' => 'owner.address.city',
'Registrant State/Province:' => 'owner.address.state',
'Registrant Country:' => 'owner.address.country',
'Registrant Phone:' => 'owner.phone',
'Registrant FAX:' => 'owner.fax',
'Registrant Email:' => 'owner.email',
'Admin Name:' => 'admin.name',
'Admin ID:' => 'admin.handle',
'Admin Street1:' => 'admin.address.address.0',
'Admin Street2:' => 'admin.address.address.1',
'Admin Street2:' => 'admin.address.address.2',
'Admin Postal Code:' => 'admin.address.pcode',
'Admin City:' => 'admin.address.city',
'Admin Country:' => 'admin.address.country',
'Admin Phone:' => 'admin.phone',
'Admin FAX:' => 'admin.fax',
'Admin Email:' => 'admin.email',
'Tech Name:' => 'tech.name',
'Tech ID:' => 'tech.handle',
'Tech Street1:' => 'tech.address.address.0',
'Tech Street2:' => 'tech.address.address.1',
'Tech Street3:' => 'tech.address.address.2',
'Tech Postal Code:' => 'tech.address.pcode',
'Tech City:' => 'tech.address.city',
'Tech Country:' => 'tech.address.country',
'Tech Phone:' => 'tech.phone',
'Tech FAX:' => 'tech.fax',
'Tech Email:' => 'tech.email'
);
$r['regrinfo'] = get_blocks($data['rawdata'], $items);
$r['regrinfo'] = generic_parser_b($data['rawdata'], $items);
/*
if (isset($r['regrinfo']['domain']['name']))
{
$r['regrinfo']['registered'] = 'yes';
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner']);
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin']);
$r = format_dates($r, 'ymd');
}
else
$r['regrinfo']['registered'] = 'no';
*/
$r['regyinfo']['referrer'] = 'http://www.registrypro.pro';
$r['regyinfo']['registrar'] = 'RegistryPRO';

View file

@ -19,7 +19,7 @@ class pt_handler {
'domain.nserver.' => 'Nameserver:',
'domain.status' => 'Estado / Status:',
'owner' => 'Titular / Registrant',
'bill' => 'Entidade Gestora / Billing Contact',
'billing' => 'Entidade Gestora / Billing Contact',
'admin' => 'Responsável Administrativo / Admin Contact',
'tech' => 'Responsável Técnico / Tech Contact',
'#' => 'Nameserver Information'
@ -30,28 +30,19 @@ class pt_handler {
if (empty($r['regrinfo']['domain']['name']))
{
$r['regrinfo']['registered'] = 'no';
return;
return $r;
}
$r['regrinfo']['domain']['created'] = get_date($r['regrinfo']['domain']['created'], 'dmy');
if ($r['regrinfo']['domain']['status'] == 'ACTIVE')
{
$r['regrinfo'] = get_contacts($r['regrinfo']);
$r['regrinfo']['registered'] = 'yes';
}
else
$r['regrinfo']['registered'] = 'no';
if (isset($r['regrinfo']['admin']))
$r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin']);
if (isset($r['regrinfo']['owner']))
$r['regrinfo']['owner'] = get_contact($r['regrinfo']['owner']);
if (isset($r['regrinfo']['tech']))
$r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
if (isset($r['regrinfo']['bill']))
$r['regrinfo']['bill'] = get_contact($r['regrinfo']['bill']);
$r['regyinfo'] = array(
'referrer' => 'http://www.fccn.pt',
'registrar' => 'FCCN'

View file

@ -42,6 +42,12 @@ $this->DATA = array(
'za.net' => 'zanet'
);
/* Non UTF-8 servers */
$this->NON_UTF8 = array(
'whois.interdomain.net' => 1
);
/* If whois Server needs any parameters, enter it here */
$this->WHOIS_PARAM = array(
@ -83,7 +89,6 @@ $this->WHOIS_SPECIAL = array(
'sc' => 'whois2.afilias-grs.net',
'tc' => 'http://www.adamsnames.tc/whois/?domain={domain}.tc',
'tf' => 'http://www.adamsnames.tc/whois/?domain={domain}.tf',
'travel' => 'http://www.whois.travel/whois.cgi?TLD=travel&dn={domain}&TYPE=DOMAIN',
've' => 'whois.nic.ve',
'vg' => 'http://www.adamsnames.tc/whois/?domain={domain}.vg',
// Second level

View file

@ -36,54 +36,54 @@ class travel_handler
function parse($data_str, $query)
{
$items = array(
'Domain Name ' => 'domain.name',
'Domain ID ' => 'domain.handle',
'Domain Status ' => 'domain.status',
'Sponsoring Registrar ' => 'domain.sponsor',
'Name Server ' => 'domain.nserver.',
'Domain Registration Date ' => 'domain.created',
'Domain Last Updated Date ' => 'domain.changed',
'Domain Expiration Date ' => 'domain.expires',
'Registrant Name ' => 'owner.name',
'Registrant ID ' => 'owner.handle',
'Registrant Address1 ' => 'owner.address.address.0',
'Registrant Address2 ' => 'owner.address.address.1',
'Registrant Postal Code ' => 'owner.address.pcode',
'Registrant City ' => 'owner.address.city',
'Registrant State/Province ' => 'owner.address.state',
'Registrant Country ' => 'owner.address.country',
'Registrant Phone Number ' => 'owner.phone',
'Registrant Email ' => 'owner.email',
'Administrative Contact Name ' => 'admin.name',
'Administrative Contact ID ' => 'admin.handle',
'Administrative Contact Address1 ' => 'admin.address.address.0',
'Administrative Contact Address2 ' => 'admin.address.address.1',
'Administrative Contact Postal Code ' => 'admin.address.pcode',
'Administrative Contact City ' => 'admin.address.city',
'Administrative Contact State/Province '=> 'admin.address.state',
'Administrative Contact Country ' => 'admin.address.country',
'Administrative Contact Phone Number ' => 'admin.phone',
'Administrative Contact Email ' => 'admin.email',
'Technical Contact Name ' => 'tech.name',
'Technical Contact ID ' => 'tech.handle',
'Technical Contact Address1 ' => 'tech.address.address.0',
'Technical Contact Address2 ' => 'tech.address.address.1',
'Technical Contact Postal Code ' => 'tech.address.pcode',
'Technical Contact City ' => 'tech.address.city',
'Technical Contact State/Province ' => 'tech.address.state',
'Technical Contact Country ' => 'tech.address.country',
'Technical Contact Phone Number ' => 'tech.phone',
'Technical Contact Email ' => 'tech.email',
'Billing Contact Name ' => 'bill.name',
'Billing Contact ID ' => 'bill.handle',
'Billing Contact Address1 ' => 'bill.address.address.0',
'Billing Contact Address2 ' => 'bill.address.address.1',
'Billing Contact Postal Code ' => 'bill.address.pcode',
'Billing Contact City ' => 'bill.address.city',
'Billing Contact State/Province ' => 'bill.address.state',
'Billing Contact Country ' => 'bill.address.country',
'Billing Contact Phone Number ' => 'bill.phone',
'Billing Contact Email ' => 'bill.email'
'Domain Name:' => 'domain.name',
'Domain ID:' => 'domain.handle',
'Domain Status:' => 'domain.status',
'Sponsoring Registrar:' => 'domain.sponsor',
'Name Server:' => 'domain.nserver.',
'Domain Registration Date:' => 'domain.created',
'Domain Last Updated Date:' => 'domain.changed',
'Domain Expiration Date:' => 'domain.expires',
'Registrant Name:' => 'owner.name',
'Registrant ID:' => 'owner.handle',
'Registrant Address1:' => 'owner.address.address.0',
'Registrant Address2:' => 'owner.address.address.1',
'Registrant Postal Code:' => 'owner.address.pcode',
'Registrant City:' => 'owner.address.city',
'Registrant State/Province:' => 'owner.address.state',
'Registrant Country:' => 'owner.address.country',
'Registrant Phone Number:' => 'owner.phone',
'Registrant Email:' => 'owner.email',
'Administrative Contact Name:' => 'admin.name',
'Administrative Contact ID:' => 'admin.handle',
'Administrative Contact Address1:' => 'admin.address.address.0',
'Administrative Contact Address2:' => 'admin.address.address.1',
'Administrative Contact Postal Code:' => 'admin.address.pcode',
'Administrative Contact City:' => 'admin.address.city',
'Administrative Contact State/Province:'=> 'admin.address.state',
'Administrative Contact Country:' => 'admin.address.country',
'Administrative Contact Phone Number:' => 'admin.phone',
'Administrative Contact Email:' => 'admin.email',
'Technical Contact Name:' => 'tech.name',
'Technical Contact ID:' => 'tech.handle',
'Technical Contact Address1:' => 'tech.address.address.0',
'Technical Contact Address2:' => 'tech.address.address.1',
'Technical Contact Postal Code:' => 'tech.address.pcode',
'Technical Contact City:' => 'tech.address.city',
'Technical Contact State/Province:' => 'tech.address.state',
'Technical Contact Country:' => 'tech.address.country',
'Technical Contact Phone Number:' => 'tech.phone',
'Technical Contact Email:' => 'tech.email',
'Billing Contact Name:' => 'bill.name',
'Billing Contact ID:' => 'bill.handle',
'Billing Contact Address1:' => 'bill.address.address.0',
'Billing Contact Address2:' => 'bill.address.address.1',
'Billing Contact Postal Code:' => 'bill.address.pcode',
'Billing Contact City:' => 'bill.address.city',
'Billing Contact State/Province:' => 'bill.address.state',
'Billing Contact Country:' => 'bill.address.country',
'Billing Contact Phone Number:' => 'bill.phone',
'Billing Contact Email:' => 'bill.email'
);
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items);

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* neulevel.whois 1.0 by David Saez <david @ ols . es> */
if(!defined("__US_HANDLER__")) define("__US_HANDLER__",1);
if(!defined('__US_HANDLER__')) define('__US_HANDLER__',1);
require_once('whois.parser.php');
@ -36,65 +36,65 @@ class us_handler {
function parse ($data_str, $query) {
$items = array(
"Domain Name:" => "domain.name",
"Domain ID:" => "domain.handle",
"Sponsoring Registrar:" => "domain.sponsor",
"Domain Status:" => "domain.status",
"Name Server:" => "domain.nserver.",
"Domain Registration Date:" => "domain.created",
"Domain Expiration Date:" => "domain.expires",
"Domain Last Updated Date:" => "domain.changed",
"Registrant ID:" => "owner.handle",
"Registrant Name:" => "owner.name",
"Registrant Organization:" => "owner.organization",
"Registrant Address1:" => "owner.address.street",
"Registrant Postal Code:" => "owner.address.pcode",
"Registrant City:" => "owner.address.city",
"Registrant State/Province:" => "owner.address.state",
"Registrant Country:" => "owner.address.country",
"Registrant Phone Number:" => "owner.phone",
"Registrant Facsimile Number:" => "owner.fax",
"Registrant Email:" => "owner.email",
"Administrative Contact ID:" => "admin.handle",
"Administrative Contact Name:" => "admin.name",
"Administrative Contact Organization:" => "admin.organization",
"Administrative Contact Address1:" => "admin.address.street",
"Administrative Contact Postal Code:" => "admin.address.pcode",
"Administrative Contact City:" => "admin.address.city",
"Administrative Contact State/Province:" => "admin.address.state",
"Administrative Contact Country:" => "admin.address.country",
"Administrative Contact Phone Number:" => "admin.phone",
"Administrative Contact Email:" => "admin.email",
"Administrative Contact Facsimile Number:" => "admin.fax",
"Technical Contact ID:" => "tech.handle",
"Technical Contact Name:" => "tech.name",
"Technical Contact Organization:" => "tech.organization",
"Technical Contact Address1:" => "tech.address.street",
"Technical Contact Postal Code:" => "tech.address.pcode",
"Technical Contact City:" => "tech.address.city",
"Technical Contact State/Province:" => "tech.address.state",
"Technical Contact Country:" => "tech.address.country",
"Technical Contact Phone Number:" => "tech.phone",
"Technical Contact Email:" => "tech.email",
"Technical Contact Facsimile Number:" => "tech.fax",
"Billing Contact ID:" => "billing.handle",
"Billing Contact Name:" => "billing.name",
"Billing Contact Organization:" => "billing.organization",
"Billing Contact Address1:" => "billing.address.street",
"Billing Contact Postal Code:" => "billing.address.pcode",
"Billing Contact City:" => "billing.address.city",
"Billing Contact State/Province:" => "billing.address.state",
"Billing Contact Country:" => "billing.address.country",
"Billing Contact Phone Number:" => "billing.phone",
"Billing Contact Email:" => "billing.email",
"Billing Contact Facsimile Number:" => "billing.fax"
'Domain Name:' => 'domain.name',
'Domain ID:' => 'domain.handle',
'Sponsoring Registrar:' => 'domain.sponsor',
'Domain Status:' => 'domain.status',
'Name Server:' => 'domain.nserver.',
'Domain Registration Date:' => 'domain.created',
'Domain Expiration Date:' => 'domain.expires',
'Domain Last Updated Date:' => 'domain.changed',
'Registrant ID:' => 'owner.handle',
'Registrant Name:' => 'owner.name',
'Registrant Organization:' => 'owner.organization',
'Registrant Address1:' => 'owner.address.street',
'Registrant Postal Code:' => 'owner.address.pcode',
'Registrant City:' => 'owner.address.city',
'Registrant State/Province:' => 'owner.address.state',
'Registrant Country:' => 'owner.address.country',
'Registrant Phone Number:' => 'owner.phone',
'Registrant Facsimile Number:' => 'owner.fax',
'Registrant Email:' => 'owner.email',
'Administrative Contact ID:' => 'admin.handle',
'Administrative Contact Name:' => 'admin.name',
'Administrative Contact Organization:' => 'admin.organization',
'Administrative Contact Address1:' => 'admin.address.street',
'Administrative Contact Postal Code:' => 'admin.address.pcode',
'Administrative Contact City:' => 'admin.address.city',
'Administrative Contact State/Province:' => 'admin.address.state',
'Administrative Contact Country:' => 'admin.address.country',
'Administrative Contact Phone Number:' => 'admin.phone',
'Administrative Contact Email:' => 'admin.email',
'Administrative Contact Facsimile Number:' => 'admin.fax',
'Technical Contact ID:' => 'tech.handle',
'Technical Contact Name:' => 'tech.name',
'Technical Contact Organization:' => 'tech.organization',
'Technical Contact Address1:' => 'tech.address.street',
'Technical Contact Postal Code:' => 'tech.address.pcode',
'Technical Contact City:' => 'tech.address.city',
'Technical Contact State/Province:' => 'tech.address.state',
'Technical Contact Country:' => 'tech.address.country',
'Technical Contact Phone Number:' => 'tech.phone',
'Technical Contact Email:' => 'tech.email',
'Technical Contact Facsimile Number:' => 'tech.fax',
'Billing Contact ID:' => 'billing.handle',
'Billing Contact Name:' => 'billing.name',
'Billing Contact Organization:' => 'billing.organization',
'Billing Contact Address1:' => 'billing.address.street',
'Billing Contact Postal Code:' => 'billing.address.pcode',
'Billing Contact City:' => 'billing.address.city',
'Billing Contact State/Province:' => 'billing.address.state',
'Billing Contact Country:' => 'billing.address.country',
'Billing Contact Phone Number:' => 'billing.phone',
'Billing Contact Email:' => 'billing.email',
'Billing Contact Facsimile Number:' => 'billing.fax'
);
$r["regrinfo"] = generic_parser_b($data_str["rawdata"],$items,'-md--y');
$r['regrinfo'] = generic_parser_b($data_str['rawdata'],$items,'-md--y');
$r["regyinfo"] = array(
"referrer"=>"http://www.neustar.us",
"registrar" => "NEUSTAR INC."
$r['regyinfo'] = array(
'referrer'=>'http://www.neustar.us',
'registrar' => 'NEUSTAR INC.'
);
return($r);

View file

@ -29,7 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* 1.1 Mark Jeftovic <markjr@easydns.com> 1999/12/15 */
class utils extends Whois {
/*
Not updated anymore
var $REGISTRARS = array(
'ac' => 'http://www.nic.ac/cgi-bin/whois',
'ad' => 'http://www.nic.ad/',
@ -104,6 +105,7 @@ class utils extends Whois {
return false;
}
}
*/
// showObject() and debugObject()
// - debug code to show an object or array
@ -163,6 +165,7 @@ class utils extends Whois {
if ($lempty) $out = trim($out);
$out = strip_tags($out);
$out = preg_replace ($email_regex, '<a href="mailto:$0">$0</a>', $out);
$out = preg_replace_callback ($html_regex, 'href_replace', $out);
@ -201,13 +204,13 @@ class utils extends Whois {
// Add bold field names
$out = preg_replace ("/(?m)^([- &;'\w\t\/]+:\s+)/", '<b>$1</b>', $out);
$out = preg_replace ("/(?m)^([-\s\.&;'\w\t\(\)\/]+:\s*)/", '<b>$1</b>', $out);
// Add italics for disclaimer
$out = preg_replace ("/(?m)^(%.*)/", '<i>$0</i>', $out);
return str_replace("\n","<br></br>\n",$out);
return str_replace("\n","<br/>\n",$out);
}
}

View file

@ -71,7 +71,6 @@ class ve_handler
$r['regrinfo']['domain']['nserver'] = $dns;
$r['regrinfo'] = get_contacts($r['regrinfo']);
return ($r);
}
}

View file

@ -37,7 +37,6 @@ class zanet_handler
function parse($data_str, $query)
{
$items = array(
'domain.name' => 'Domain Name : ',
'domain.created' => 'Record Created :',

View file

@ -8,7 +8,7 @@ be nic.be
br registro.br
ca cira.ca
ch creart.ch blaueskreuz.ch
cn cnnic.net.cn
cn china.cn
cz nic.cz
de 4ever.de ks2-hanau.de
fi ficora.fi

File diff suppressed because one or more lines are too long

View file

@ -1,68 +0,0 @@
<?php
/*
Whois.php PHP classes to conduct whois queries
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
Maintained by David Saez (david@ols.es)
For the most recent version of this package visit:
http://www.phpwhois.org
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.
*/
/* domainbank.whois 1.0 David Saez Padros <david@ols.es> */
if (!defined('__DOMAINBANK_HANDLER__'))
define('__DOMAINBANK_HANDLER__', 1);
require_once('whois.parser.php');
class domainbank_handler
{
function parse($data_str, $query)
{
$items = array(
'owner' => 'Registrant:',
'admin' => 'Administrative',
'tech' => 'Technical',
'zone' => 'Zone',
'domain.name' => 'Domain:',
'domain.nserver.' => 'Domain servers in listed order:',
'domain.created' => 'Record created on ',
'domain.expires' => 'Record expires on ',
'domain.changed' => 'Record last updated ',
'domain.sponsor' => 'Registrar:'
);
$r = get_blocks($data_str, $items);
if (isset($r['owner']))
$r['owner'] = get_contact($r['owner']);
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin']);
if (isset($r['tech']))
$r['tech'] = get_contact($r['tech']);
if (isset($r['zone']))
$r['zone'] = get_contact($r['zone']);
return ($r);
}
}
?>