diff --git a/Changes.md b/Changes.md index ce84807..39161ee 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,17 @@ +2005/07/16 David Saez + - normalized expired/created/chaged dates + - report non existant dns servers + - improved getdate.whois + - fixed benic.whois + - improvements to genric whois handling + +2005/04/28 David Saez + - Fixed .fm handling + - normalized expired/created/chaged dates + - changed the way nservers are normalized + - some fixes + - adde CLI mode example + 2005/03/14 David Saez - added handler for TV CORPORATION diff --git a/Handlers.md b/Handlers.md index c8c8f61..6d85c82 100644 --- a/Handlers.md +++ b/Handlers.md @@ -42,11 +42,9 @@ the following subkeys: name -> domain name desc -> description of the domain - nserver -> array containing canonical names - of all nameservers for that domain - listed i n order. Optionally it can - also include the name server ip address - following the canonical name. + nserver -> array where the key is the canonical name + of each nameserver and the value is the + ip adresss (if none) of the server. status -> status of the domain (registry dependant) changed -> date of last change created -> creation date @@ -109,8 +107,10 @@ the following subkeys: Not all handlers fill values in each of the keys defined by the Common Object Model as not all registries return the same amount of data about a domain or ip address. Also there are some differences -on the format returned for some keys (mainly the keys that reflect -dates). +on the format returned for some keys. + +Dates (created/changed/expires) are always returned in the format +yyyy-mm-dd. Writing handlers diff --git a/ascio.whois b/ascio.whois index f72d10c..b1e303b 100644 --- a/ascio.whois +++ b/ascio.whois @@ -31,6 +31,7 @@ if(!defined("__ASCIO_HANDLER__")) define("__ASCIO_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class ascio extends gtld { @@ -54,6 +55,7 @@ class ascio extends gtld { $r["owner"] = get_contact($r["owner"]); $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); + format_dates($r,'ymd'); return($r); } } diff --git a/atnic.whois b/atnic.whois index 504907e..5ecbe1b 100644 --- a/atnic.whois +++ b/atnic.whois @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__ATNIC_HANDLER__")) define("__ATNIC_HANDLER__",1); -include_once("generic.whois"); +include_once('generic.whois'); class atnic extends Whois { @@ -58,7 +58,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); +$reg=generic_whois($data_str["rawdata"],$translate,$contacts,'domain','Ymd'); if (isset($reg["domain"]["remarks"])) unset($reg["domain"]["remarks"]); diff --git a/aunic.whois b/aunic.whois index 6c01c10..1116905 100644 --- a/aunic.whois +++ b/aunic.whois @@ -33,7 +33,7 @@ if(!defined("__AUNIC_HANDLER__")) define("__AUNIC_HANDLER__",1); -include_once("generic2.whois"); +include_once('generic2.whois'); class aunic extends Whois { @@ -62,7 +62,7 @@ class aunic extends Whois { $r["regyinfo"] = array("referrer"=>"http://www.aunic.net", "registrar"=>"AU-NIC"); - $r["regrinfo"] = generic_whois($data_str["rawdata"],$items); + $r['regrinfo'] = generic_whois($data_str['rawdata'],$items); return $r; } } diff --git a/benic.whois b/benic.whois index d14be66..1dad310 100755 --- a/benic.whois +++ b/benic.whois @@ -26,9 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* benic.whois 1.0 Matthijs Koot */ -/* benic.whois 1.1 David Saez */ +/* benic.whois 1.2 David Saez */ -include_once("generic3.whois"); +include_once('generic3.whois'); +include_once('getdate.whois'); if(!defined("__BENIC_HANDLER__")) define("__BENIC_HANDLER__",1); @@ -43,17 +44,12 @@ class benic extends Whois { $items = array( "domain.name" => "Domain:", "domain.status" => "Status:", - "domain.nserver" => "NameServers:", + "domain.nserver" => "Nameservers:", "domain.created" => "Registered:", "owner" => "Licensee:", - "owner.organization" => "Company:", - "owner.email" => "Email:", "admin" => "Onsite Contacts:", - "admin.organization" => "Company:", - "admin.email" => "Email:", "tech" => "Agent Technical Contacts:", - "tech.organization" => "Company:", - "tech.email" => "Email:" + 'agent' => 'Agent:' ); $r["rawdata"]=$data["rawdata"]; @@ -62,22 +58,23 @@ class benic extends Whois { $r["regrinfo"] = get_blocks($data["rawdata"],$items); - if (isset($r['regrinfo']['domain']['name'])) { + 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"]); - $r["regrinfo"]["admin"] = get_contact($r["regrinfo"]["admin"]); - - $r["regrinfo"]["owner"]["name"] = str_replace("Name: ", "", $r["regrinfo"]["owner"]["name"]); - $r["regrinfo"]["tech"]["name"] = str_replace("Name: ", "", $r["regrinfo"]["tech"]["name"]); - $r["regrinfo"]["admin"]["name"] = str_replace("Name: ", "", $r["regrinfo"]["admin"]["name"]); - - $r["regrinfo"]["owner"]["organization"] = str_replace("Company: ", "", $r["regrinfo"]["owner"]["address"][1]); - $r["regrinfo"]["tech"]["organization"] = str_replace("Company: ", "", $r["regrinfo"]["tech"]["address"][1]); - $r["regrinfo"]["admin"]["organization"] = str_replace("Company: ", "", $r["regrinfo"]["admin"]["address"][1]); - - $r["regrinfo"]["domain"]["nserver"][0] = str_replace("Name: ", "", $r["regrinfo"]["domain"]["nserver"][0]); - $r["regrinfo"]["domain"]["nserver"][1] = str_replace("Name: ", "", $r["regrinfo"]["domain"]["nserver"][1]); + $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']); + + if (isset($r['regrinfo']['agent'])) + { + $sponsor = get_contact($r['regrinfo']['agent']); + unset($r['regrinfo']['agent']); + $r['regrinfo']['domain']['sponsor']=$sponsor['name']; + } + + $r=format_dates($r,'-mdy'); } else $r['regrinfo']['registered']='no'; diff --git a/brnic.whois b/brnic.whois index ea1a187..5504b2a 100644 --- a/brnic.whois +++ b/brnic.whois @@ -56,7 +56,7 @@ $contacts = array ( "billing-c" => "billing" ); -$r = generic_whois($data_str["rawdata"],$translate,$contacts,"domain"); +$r = generic_whois($data_str["rawdata"],$translate,$contacts,"domain",'Ymd'); $r["rawdata"]=$data_str["rawdata"]; $r["regyinfo"]=array( "registrar"=>"BR-NIC", "referrer"=>"http://www.nic.br"); diff --git a/bulkregistercom.whois b/bulkregistercom.whois index 29b858e..39b53b7 100644 --- a/bulkregistercom.whois +++ b/bulkregistercom.whois @@ -51,6 +51,8 @@ if(!defined("__BULKREGISTERCOM_HANDLER__")) define("__BULKREGISTERCOM_HANDLER__" #################################################*/ +require_once('getdate.whois'); + class bulkregistercom extends gtld { function bulkregistercom($data) { @@ -114,6 +116,7 @@ function parse ($data_str) { for($i=0,$max=count($ns);$i<$max;$i++) { $r["domain"]["nserver"][]=$ns[$i]; } + format_dates($r,'ymd'); return($r); } diff --git a/buydomains.whois b/buydomains.whois index 1de10cc..6e4f51c 100644 --- a/buydomains.whois +++ b/buydomains.whois @@ -31,6 +31,7 @@ if(!defined("__BUYDOMAINS_HANDLER__")) define("__BUYDOMAINS_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class buydomains extends gtld { @@ -56,6 +57,7 @@ class buydomains extends gtld { $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); $r["zone"] = get_contact($r["zone"]); + format_dates($r,'dmy'); return($r); } diff --git a/chnic.whois b/chnic.whois index 4114fa1..fe9cd74 100644 --- a/chnic.whois +++ b/chnic.whois @@ -32,7 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* 24/7/2002 2.0 David Saez - updated to new object model */ /* 17/3/2003 2.1 David Saez - rewritten to use generic3.whois */ -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); if(!defined("__CHNIC_HANDLER__")) define("__CHNIC_HANDLER__",1); @@ -65,16 +66,18 @@ if (!empty($r["regrinfo"]["domain"]["name"])) { $r["regrinfo"]["tech"] = get_contact($r["regrinfo"]["tech"]); $r["regrinfo"]["domain"]["name"]=$r["regrinfo"]["domain"]["name"][0]; - $r["regrinfo"]["domain"]["changed"]=$r["regrinfo"]["domain"]["changed"][0]; - $r["regrinfo"]["domain"]["created"]=$r["regrinfo"]["domain"]["created"][0]; + $r["regrinfo"]["domain"]["changed"]=get_date($r["regrinfo"]["domain"]["changed"][0],'dmy'); + $r["regrinfo"]["domain"]["created"]=get_date($r["regrinfo"]["domain"]["created"][0],'dmy'); $r["regyinfo"]=array("referrer"=>"http://www.nic.ch", "registrar"=>"SWITCH Domain Name Registration"); + $r["regrinfo"]["registered"]="yes"; -} -else { $r=""; - $r["regrinfo"]["registered"]="no"; - } + } +else { + $r=''; + $r["regrinfo"]["registered"]="no"; + } return($r); } diff --git a/cira.whois b/cira.whois index 105136b..af7bb31 100755 --- a/cira.whois +++ b/cira.whois @@ -69,7 +69,7 @@ $items=array( "owner.organization" => "Organization:", $r["rawdata"]=$data_str["rawdata"]; -$r["regrinfo"]=generic_whois($data_str["rawdata"],$items); +$r["regrinfo"]=generic_whois($data_str["rawdata"],$items,'ymd'); $r["regyinfo"]=array( "referrer"=>"http://www.easydns.ca" ); diff --git a/cnnic.whois b/cnnic.whois index 31aab85..f9a2e84 100644 --- a/cnnic.whois +++ b/cnnic.whois @@ -88,7 +88,7 @@ class cnnic extends Whois { $r["rawdata"] = $data_str["rawdata"]; $r["regyinfo"] = array( "referrer"=>"http://www.cnnic.net.cn", "registrar" => "China NIC"); - $r["regrinfo"] = generic_whois ($data_str["rawdata"],$items); + $r["regrinfo"] = generic_whois ($data_str["rawdata"],$items,'ymd'); return($r); } } diff --git a/cronon.whois b/cronon.whois index 59f9887..6ccfeb0 100644 --- a/cronon.whois +++ b/cronon.whois @@ -31,6 +31,7 @@ if(!defined("__CRONON_HANDLER__")) define("__CRONON_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class cronon extends gtld { @@ -53,6 +54,7 @@ class cronon extends gtld { $r["owner"] = get_contact($r["owner"]); $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); + format_dates($r,'ymd'); return($r); } } diff --git a/denic.whois b/denic.whois index 69eb739..a25ed7b 100644 --- a/denic.whois +++ b/denic.whois @@ -147,6 +147,8 @@ class denic extends Whois { "referrer" => "http://www.denic.de/"); if (isset($disclaimer)) $r["regrinfo"]["disclaimer"]=$disclaimer; + + $r['regrinfo']['domain']['changed']=substr($r['regrinfo']['domain']['changed'],0,10); return($r); } } diff --git a/directnic.whois b/directnic.whois index d22569c..e23cdd3 100644 --- a/directnic.whois +++ b/directnic.whois @@ -31,6 +31,7 @@ if(!defined("__DIRECTNIC_HANDLER__")) define("__DIRECTNIC_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class directnic extends gtld { @@ -56,6 +57,7 @@ class directnic extends gtld { $r["owner"] = get_contact($r["owner"]); $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); + format_dates($r,'mdy'); return($r); } diff --git a/dotfm.whois b/dotfm.whois index c2ab365..41e594b 100644 --- a/dotfm.whois +++ b/dotfm.whois @@ -29,7 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__DOTFM_HANDLER__")) define("__DOTFM_HANDLER__",1); -require_once("generic2.whois"); +require_once('generic2.whois'); +require_once('generic3.whois'); class dotfm extends Whois { @@ -41,27 +42,42 @@ $this->result=$this->parse($data); function parse ($data) { + $items = array( "owner" => "Registrant", + "admin" => "Administrative", + "tech" => "Technical", + "billing" => "Billing" ); + + $blocks = get_blocks($data['rawdata'],$items); + $items = array( - "domain.name" => "FM Domain:", - "domain.nserver.0" => "Primary Hostname:", - "domain.nserver.1" => "Secondary Hostname:", - "domain.expires" => "Renewal Date::", - "owner.organization" => "Organization:", - "owner.name" => "Name:", - "owner.address." => "Address:", - "owner.address.city" => "City, State Zip:", - "owner.address.country" => "Country", - "owner.phone" => "Phone:", - "owner.fax" => "Fax:", - "owner.email" => "Email:" + "name" => "FM Domain:", + "nserver.0" => "Primary Hostname:", + "nserver.1" => "Secondary Hostname:", + "expires" => "Renewal Date:" ); - $r["rawdata"]=$data["rawdata"]; - - $r["regrinfo"] = generic_whois($data["rawdata"],$items); + $r['regrinfo']['domain'] = generic_whois($data['rawdata'],$items); - $r["regyinfo"]["referrer"]="http://www.dot.dm"; - $r["regyinfo"]["registrar"]="dotFM"; + $items = array ( + 'organization' => 'Organiztion:', + 'name' => 'Name:', + 'address.0' => 'Address:', + 'address.1' => 'City, State Zip:', + 'address.country' => 'Country:', + 'phone' => 'Phone:', + 'fax' => 'Fax:', + 'email' => 'Email:' + ); + + $r['rawdata']=$data['rawdata']; + + while (list($key, $val) = each($blocks)) + { + $r['regrinfo'][$key] = generic_whois($val,$items); + } + + $r['regyinfo']['referrer']='http://www.dot.dm'; + $r['regyinfo']['registrar']='dotFM'; return($r); } diff --git a/dotregistrar.whois b/dotregistrar.whois index ddb926a..5bca20e 100644 --- a/dotregistrar.whois +++ b/dotregistrar.whois @@ -33,6 +33,7 @@ if(!defined("__DOTREGISTRAR_HANDLER__")) define("__DOTREGISTRAR_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class dotregistrar extends gtld { @@ -50,7 +51,9 @@ class dotregistrar extends gtld { "domain.nserver." => "Name Server:", "domain.created" => "Record created on", "domain.expires" => "Record expires on", - "domain.changed" => "Record last updated on" + "domain.changed" => "Record last updated on", + "domain.status" => "Status:", + "domain.name" => "Domain Name:" ); $r = get_blocks($data_str,$items); @@ -58,6 +61,7 @@ class dotregistrar extends gtld { $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); $r["zone"] = get_contact($r["zone"]); + format_dates($r,'dmy'); return($r); } diff --git a/dotster.whois b/dotster.whois index 4481ca8..5c2cf36 100644 --- a/dotster.whois +++ b/dotster.whois @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__DOTSTER_HANDLER__")) define("__DOTSTER_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class dotster extends gtld { @@ -44,19 +45,21 @@ function parse ($data_str) { $items = array( "owner" => "Registrant:", - "admin" => "Administrative Contact", - "tech" => "Technical Contact", + "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.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); } diff --git a/enom.whois b/enom.whois index 70eb268..ffdfbd9 100644 --- a/enom.whois +++ b/enom.whois @@ -28,11 +28,12 @@ /* enom.whois 1.0 stephen leavitt 2000/12/09 */ /* enom.whois 2.0 tim schulte 2001/03/21 */ -/* enom.whois 3.0 david@ols.es 2003/02/16 */ +/* enom.whois 3.1 david@ols.es 2003/02/16 */ if(!defined("__ENOM_HANDLER__")) define("__ENOM_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class enom extends gtld { @@ -65,6 +66,7 @@ class enom extends gtld { $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); $r["billing"] = get_contact($r["billing"]); + $r=format_dates($r,'dmy'); return($r); } } diff --git a/esnic.whois b/esnic.whois index 5fbddcf..874b09f 100644 --- a/esnic.whois +++ b/esnic.whois @@ -39,6 +39,7 @@ if(!defined("__ESNIC_HANDLER__")) define("__ESNIC_HANDLER__",1); require_once('generic3.whois'); +require_once('getdate.whois'); function buscar ($what, $where) { @@ -65,13 +66,13 @@ class esnic extends Whois { 'domain.expires' => 'Fecha Caducidad ', 'domain.nserver' => 'Nombre Servidor:', 'domain.sponsor' => 'Agente Registrador', - 'owner' => 'Tipo de Contacto Titular:', - 'admin' => 'Tipo de Contacto Administrativo:', - 'billing' => 'Tipo de Contacto Facturación:', - 'tech' => 'Tipo de Contacto Técnico:' + 'owner' => 'Tipo de Contacto Titular', + 'admin' => 'Tipo de Contacto Administrativo', + 'billing' => 'Tipo de Contacto Facturación', + 'tech' => 'Tipo de Contacto Técnico' ); - $citms = array ( 'handle' => 'NIC_HANDLE', + $citms = array ('handle' => 'NIC_HANDLE ', 'name' => 'Nombre', 'type' => 'Tipo de Titular', 'organization' => 'Organización', @@ -81,7 +82,8 @@ class esnic extends Whois { 'address' => 'Domicilio', 'city' => 'Población', 'zcode' => 'Código Postal', - 'country' => 'País' + 'country' => 'País', + 'role' => 'Cargo' ); $data = array(); @@ -125,7 +127,9 @@ class esnic extends Whois { $r['regrinfo'] = get_blocks($data,$items); if (isset($r['regrinfo']['domain']['name'])) { - $r['regrinfo']['owner'] = buscar($r['regrinfo']['owner'],$cont); + $owner=buscar($r['regrinfo']['owner'],$cont); + if ($owner!='') + $r['regrinfo']['owner'] = $owner; $r['regrinfo']['admin'] = buscar($r['regrinfo']['admin'],$cont); $r['regrinfo']['billing'] = buscar($r['regrinfo']['billing'],$cont); $r['regrinfo']['tech'] = buscar($r['regrinfo']['tech'],$cont); @@ -138,7 +142,7 @@ class esnic extends Whois { 'registrar'=>'ES-NIC' ); $r['rawdata'] = $data_str['rawdata']; - + format_dates($r,'ymd'); return $r; } } diff --git a/godaddy.whois b/godaddy.whois index 8f428b2..726897e 100644 --- a/godaddy.whois +++ b/godaddy.whois @@ -30,7 +30,8 @@ if(!defined("__GODADDY_HANDLER__")) define("__GODADDY_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class godaddy extends gtld { @@ -41,8 +42,8 @@ class godaddy extends gtld { function parse ($data_str) { $items = array( "owner" => "Registrant:", - "admin" => "Administrative Contact:", - "tech" => "Technical Contact:", + "admin" => "Administrative Contact", + "tech" => "Technical Contact", "domain.name" => "Domain Name:", "domain.nserver." => "Domain servers in listed order:", "domain.created" => "Created on:", @@ -55,6 +56,7 @@ class godaddy extends gtld { $r["owner"] = get_contact($r["owner"]); $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); + $r=format_dates($r,'dmy'); return($r); } } diff --git a/gtld.whois b/gtld.whois index 9f77aeb..4caf443 100644 --- a/gtld.whois +++ b/gtld.whois @@ -79,7 +79,8 @@ class gtld extends Whois { 'STARGATE HOLDINGS CORP.' => 'stargate', 'TLDS, INC. DBA SRSPLUS' => 'srsplus', 'TLDS, LLC DBA SRSPLUS' => 'srsplus', - 'TUCOWS, INC.' => 'opensrsnet', + 'TUCOWS, INC.' => 'opensrsnet', + 'TUCOWS INC.' => 'opensrsnet', 'TV CORPORATION' => 'tvcorp', 'WILD WEST DOMAINS, INC.' => 'godaddy' ); @@ -87,8 +88,10 @@ class gtld extends Whois { function gTLD ($data, $query) { $this->Query = $query; $this->SUBVERSION = sprintf("%s-%s", $query["handler"], $this->HANDLER_VERSION); - $this->result = generic_whois($data["rawdata"],$this->REG_FIELDS); + $this->result = generic_whois($data["rawdata"],$this->REG_FIELDS,'dmy'); + unset($this->Query["handler"]); + if($this->HACKS["nsi_referral_loop"] && ($this->result["regyinfo"]["whois"] == $this->HACKS["wrong_netsol_whois"])) { $this->Query["server"] = $this->HACKS["real_netsol_whois"]; diff --git a/hunic.whois b/hunic.whois index c26f408..b656832 100755 --- a/hunic.whois +++ b/hunic.whois @@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__HUNIC_HANDLER__")) define("__HUNIC_HANDLER__",1); include_once("generic.whois"); +include_once('getdate.whois'); class hunic extends Whois { @@ -126,6 +127,7 @@ while (list($key,$val)=each($reg['domain'])) } $r["regrinfo"]=$reg; +format_dates($r,'ymd'); return($r); } } diff --git a/innerwise.whois b/innerwise.whois index 010682e..ece9fae 100644 --- a/innerwise.whois +++ b/innerwise.whois @@ -30,7 +30,8 @@ if(!defined("__INNERWISE_HANDLER__")) define("__INNERWISE_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class innerwise extends gtld { @@ -52,10 +53,11 @@ class innerwise extends gtld { ); $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['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); } } diff --git a/interdomain.whois b/interdomain.whois index 6e38510..abc0c01 100644 --- a/interdomain.whois +++ b/interdomain.whois @@ -81,7 +81,8 @@ class interdomain extends gtld { "tech.fax" => "Technical Fax............" ); - return generic_whois($data_str,$items); + $ret = generic_whois($data_str,$items,'dmy'); + return $ret; } } diff --git a/ipw.whois b/ipw.whois index dcc0efe..a5ac1f7 100644 --- a/ipw.whois +++ b/ipw.whois @@ -62,6 +62,8 @@ function ipw ($data,$query) { $this->Query=$query; +unset($this->Query["handler"]); + if (!isset($this->result["rawdata"])) { $this->result["rawdata"] = array(); } $this->result["regyinfo"]=array(); diff --git a/isnic.whois b/isnic.whois index 2fa4f7a..c196937 100644 --- a/isnic.whois +++ b/isnic.whois @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__ISNIC_HANDLER__")) define("__ISNIC_HANDLER__",1); -include_once("generic.whois"); +include_once('generic.whois'); class isnic extends Whois { @@ -55,7 +55,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); +$reg=generic_whois($data_str["rawdata"],$translate,$contacts,'domain','mdy'); if (isset($reg['domain']['descr'])) { $reg['owner']['name'] = array_shift($reg['domain']['descr']); diff --git a/joker.whois b/joker.whois index aac5ba8..e056685 100644 --- a/joker.whois +++ b/joker.whois @@ -25,11 +25,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* joker.whois 1.00 David Saez */ +/* joker.whois 1.10 David Saez */ if(!defined("__JOKER_HANDLER__")) define("__JOKER_HANDLER__",1); -include_once("generic2.whois"); +include_once('generic2.whois'); class joker extends gtld { @@ -40,18 +40,18 @@ class joker extends gtld { function parse ($data_str) { $items = array( - "owner.name" => "owner:", - "owner.address.street" => "address:", - "owner.address.zcode" => "postal-code:", - "owner.address.city" => "city:", - "owner.address.state" => "state:", - "owner.address.country" => "country:", - "admin.email" => "admin-c:", - "tech.email" => "tech-c:", - "billing.email" => "billing-c:", - "domain.created" => "created:", - "domain.changed" => "modified:", - "domain.sponsor" => "reseller-1:" + 'owner.name' => 'owner:', + 'owner.address.street' => 'address:', + 'owner.address.zcode' => 'postal-code:', + 'owner.address.city' => 'city:', + 'owner.address.state' => 'state:', + 'owner.address.country' => 'country:', + 'admin.email' => 'admin-c:', + 'tech.email' => 'tech-c:', + 'billing.email' => 'billing-c:', + 'domain.created' => 'created:', + 'domain.changed' => 'modified:', + 'domain.sponsor' => 'reseller-1:' ); $r=generic_whois($data_str,$items); diff --git a/lunic.whois b/lunic.whois index c9b1d09..d89a0ee 100644 --- a/lunic.whois +++ b/lunic.whois @@ -75,7 +75,7 @@ class lunic extends Whois { $r["rawdata"] = $data_str["rawdata"]; $r["regyinfo"] = array( "referrer"=>"http://www.dns.lu", "registrar" => "DNS-LU"); - $r["regrinfo"] = generic_whois ($data_str["rawdata"],$items); + $r["regrinfo"] = generic_whois ($data_str["rawdata"],$items,'dmy'); return($r); } } diff --git a/moniker.whois b/moniker.whois index 5d9cb25..3667426 100644 --- a/moniker.whois +++ b/moniker.whois @@ -26,11 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* moniker.whois 1.0 David Saez Padros */ +/* moniker.whois 1.1 David Saez Padros */ if(!defined("__MONIKER_HANDLER__")) define("__MONIKER_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class moniker extends gtld { @@ -40,15 +41,15 @@ class moniker extends gtld { function parse ($data_str) { - $items = array( "owner" => "Registrant:", + $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 " + "domain.created" => "Record created on: ", + "domain.expires" => "Domain Expires on: ", + "domain.changed" => "Database last updated on: " ); $r = get_blocks($data_str,$items); @@ -56,6 +57,7 @@ class moniker extends gtld { $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); } } diff --git a/mxnic.whois b/mxnic.whois index a9b88d1..9759141 100644 --- a/mxnic.whois +++ b/mxnic.whois @@ -31,6 +31,8 @@ if(!defined("__MXNIC_HANDLER__")) define("__MXNIC_HANDLER__",1); +require_once('getdate.whois'); + class mxnic extends Whois { function mxnic($data) { @@ -104,6 +106,7 @@ class mxnic extends Whois { } else $r = ""; + format_dates($r,'dmy'); return($r); } diff --git a/netsol.whois b/netsol.whois index 7906be8..b1858ae 100644 --- a/netsol.whois +++ b/netsol.whois @@ -26,64 +26,39 @@ */ /* netsol.whois 1.0 mark jeftovic 1999/12/06 */ +/* netsol.whois 2.0 david saez */ if(!defined("__NETSOL_HANDLER__")) define("__NETSOL_HANDLER__",1); +require_once('generic3.whois'); +require_once('getdate.whois'); + class netsol extends gtld { function netsol($data) { - $this->result=$this->parse( - preg_replace("/\n+/","_",implode("\n",$data)) - ); + $this->result=$this->parse($data); } function parse ($data_str) { - $data_str=preg_replace("/\s+/"," ",$data_str); - preg_match("/^(.+)Registrant:_/",$data_str,$refs); - if (!isset($refs[1])) { - return array(); - } + $items = array( + "owner" => "Registrant:", + "admin" => "Administrative Contact", + "tech" => "Technical Contact", + "domain.name" => "Domain Name:", + "domain.nserver." => "Domain servers in listed order:", + "domain.created" => "Record created on", + "domain.expires" => "Record expires on" + ); - $r["disclaimer"]=preg_replace("/_/","\n",$refs[1]); - //preg_match("/^.+Registrant:_(.+)\s+\((.+-DOM)\)_/", $data_str,$refs); - preg_match("/^.+Registrant:_(.+)\s+\((.+)\)_\s*(.+)_\s*Domain Name:\s(.+)_/", $data_str,$refs); - $r["owner"]["organization"]=$refs[1]; - $r["owner"]["handle"]=$refs[2]; - $r["owner"]["address"]=explode("_",$refs[3]); - //preg_match("/\(.+-DOM\)_\s*(.+)_\s*Domain Name:\s(.+)_\sAdmin/",$data_str,$refs); - //$r["owner"]["address"]=explode("_",$refs[1]); - //preg_replace("/_/","\n",$refs[1]); - //$r["domain"]["name"]=$refs[2]; - preg_match("/Administrative .*?Contact:_(.+?)\((.+?)\)\s(.+?@.+?)_/",$data_str, $refs); - $r["admin"]["name"]=$refs[1]; - $r["admin"]["handle"]=$refs[2]; - $r["admin"]["email"]=$refs[3]; - preg_match("/Technical .*?Contact:_(.+?)\((.+?)\)\s(.+?@.+?)_/",$data_str, $refs); - $r["tech"]["name"]=$refs[1]; - $r["tech"]["handle"]=$refs[2]; - $r["tech"]["email"]=$refs[3]; - preg_match("/Billing Contact:_(.+?)\((.+?)\)\s(.+?@.+?)_/",$data_str, $refs); - if (isset($refs[1])) $r["billing"]["name"]=$refs[1]; - if (isset($refs[2])) $r["billing"]["handle"]=$refs[2]; - if (isset($refs[3])) $r["billing"]["email"]=$refs[3]; + $r = get_blocks($data_str,$items); - //preg_match("/Record last updated on (.+?)\./",$data_str, $refs); - //$r["domain"]["changed"]=$refs[1]; - preg_match("/Record created on (.+?)\./",$data_str, $refs); - $r["domain"]["created"]=$refs[1]; - preg_match("/Record expires on (.+?)\./",$data_str, $refs); - $r["domain"]["expires"]=$refs[1]; - preg_match("/Domain servers in listed order:_ (.+)$/",$data_str, $refs); - $ns=explode("_", $refs[1]); - for($i=0,$max=count($ns);$i<$max;$i++) { - @list($k,$v)=split(" ", trim($ns[$i])); - if ($k!="") $r["domain"]["nserver"][]=$k." [".$v."]"; - } + $r["owner"] = get_contact($r["owner"]); + $r["admin"] = get_contact($r["admin"]); + $r["tech"] = get_contact($r["tech"]); + $r=format_dates($r,'dmy'); - return($r); + return($r); } - } - ?> diff --git a/neulevel.whois b/neulevel.whois index 68ad1a7..6049421 100755 --- a/neulevel.whois +++ b/neulevel.whois @@ -25,8 +25,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* neulevel.whois 2.1 7/2/2002 David Saez now uses generic2 */ -/* neulevel.whois 2.0 7/2/2002 David Saez stadarized object model */ +/* neulevel.whois 2.2 David Saez */ /* neulevel.whois 1.0 by Brian Blood */ if(!defined("__NEULEVEL_HANDLER__")) define("__NEULEVEL_HANDLER__",1); @@ -91,11 +90,11 @@ function parse ($data_str) { "billing.email" => "Billing Contact Email:" ); - $r["rawdata"] = $data_str["rawdata"]; - $r["regrinfo"] = generic_whois($data_str["rawdata"],$items); + $r['rawdata'] = $data_str['rawdata']; + $r['regrinfo'] = generic_whois($data_str['rawdata'],$items,'-md--y'); - $r["regyinfo"] = array( "referrer"=>"http://www.neulevel.biz", - "registrar" => "NEULEVEL" ); + $r['regyinfo'] = array( 'referrer' => 'http://www.neulevel.biz', + 'registrar' => 'NEULEVEL' ); return($r); } diff --git a/neustar.whois b/neustar.whois index 3903e61..7b26bf4 100644 --- a/neustar.whois +++ b/neustar.whois @@ -56,6 +56,7 @@ function parse ($data_str) { "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:", @@ -67,6 +68,7 @@ function parse ($data_str) { "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:", @@ -77,6 +79,7 @@ function parse ($data_str) { "tech.address.country" => "Technical Contact Country:", "tech.phone" => "Technical Contact Phone Number:", "tech.email" => "Technical Contact Email:", + "tech.fax" => "Technical Contact Facsimile Number:", "billing.handle" => "Billing Contact ID:", "billing.name" => "Billing Contact Name:", "billing.organization" => "Billing Contact Organization:", @@ -86,11 +89,12 @@ function parse ($data_str) { "billing.address.state" => "Billing Contact State/Province:", "billing.address.country" => "Billing Contact Country:", "billing.phone" => "Billing Contact Phone Number:", - "billing.email" => "Billing Contact Email:" + "billing.email" => "Billing Contact Email:", + "billing.fax" => "Billing Contact Facsimile Number:" ); $r["rawdata"] = $data_str["rawdata"]; - $r["regrinfo"] = generic_whois($data_str["rawdata"],$items); + $r["regrinfo"] = generic_whois($data_str["rawdata"],$items,'-md--y'); $r["regyinfo"] = array( "referrer"=>"http://www.neustar.us", "registrar" => "NEUSTAR INC." ); diff --git a/nicline.whois b/nicline.whois index 6ba07a4..1f2610d 100644 --- a/nicline.whois +++ b/nicline.whois @@ -27,11 +27,13 @@ */ /* NICLINE.whois 1.0 Carlos Galvez */ +/* NICLINE.whois 1.1 David Saez */ /* Example "niclide.com" */ if(!defined("__NICLINE_HANDLER__")) define("__NICLINE_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class nicline extends gtld { @@ -57,9 +59,8 @@ class nicline extends gtld { $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); //$r["zone"] = get_contact($r["zone"]); + $r=format_dates($r,'dmy'); return($r); - } - } ?> diff --git a/nicse.whois b/nicse.whois index 007e6b0..11da9b3 100644 --- a/nicse.whois +++ b/nicse.whois @@ -32,7 +32,7 @@ if(!defined("__NICSE_HANDLER__")) define("__NICSE_HANDLER__",1); -require_once("generic2.whois"); +require_once('generic2.whois'); class nicse extends Whois { @@ -45,7 +45,7 @@ class nicse extends Whois { "domain.name" => "*domainname.name:", "domain.status" => "*domainname.status:", "domain.expires" => "*domainname.date_to_delete:", - "domain.nserver." => " NS " ); + "domain.nserver." => "\tNS\t" ); $r["rawdata"]=$data_str["rawdata"]; diff --git a/nlnic.whois b/nlnic.whois index 8595db0..09c8dc8 100644 --- a/nlnic.whois +++ b/nlnic.whois @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__NLNIC_HANDLER__")) define("__NLNIC_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class nlnic extends Whois { @@ -47,12 +48,13 @@ function parse ($data) "domain.name" => "Domain name:", "domain.status" => "Status:", "domain.nserver" => "Domain nameservers:", - "domain.created" => "Date first registered:", + "domain.created" => "Date registered:", "domain.changed" => "Record last updated:", "domain.sponsor" => "Record maintained by:", "owner" => "Registrant:", "admin" => "Administrative contact:", - "tech" => "Technical contact:" + "tech" => "Technical contact:", + "zone" => "Registrar:" ); $r["rawdata"]=$data["rawdata"]; @@ -71,8 +73,10 @@ function parse ($data) $r["regrinfo"]["tech"] = get_contact($r["regrinfo"]["tech"]); $r["regrinfo"]["owner"] = get_contact($r["regrinfo"]["owner"]); $r["regrinfo"]["admin"] = get_contact($r["regrinfo"]["admin"]); + $r["regrinfo"]["zone"] = get_contact($r["regrinfo"]["zone"]); $r["regrinfo"]["registered"]="yes"; + format_dates($r,'dmy'); return($r); } } diff --git a/nunames.whois b/nunames.whois index 74e4161..bd1b91b 100644 --- a/nunames.whois +++ b/nunames.whois @@ -31,6 +31,8 @@ if(!defined("__NUNAMES_HANDLER__")) define("__NUNAMES_HANDLER__",1); +require_once('getdate.whois'); + class nunames extends Whois { function nunames($data) { @@ -83,6 +85,7 @@ class nunames extends Whois { else $r['regrinfo']['registered']='no'; } + format_dates($r,'dmy'); return($r); } } diff --git a/opensrsnet.whois b/opensrsnet.whois index 1404f4d..1c7f0ea 100644 --- a/opensrsnet.whois +++ b/opensrsnet.whois @@ -1,4 +1,4 @@ - "Administrative Contact", "tech" => "Technical Contact", "domain.name" => "Domain name:", - "domain.sponsor" => "Registration Service Provider:", + "domain.sponsor" => "Registrar of Record:", "domain.nserver" => "Domain servers in listed order:", "domain.changed" => "Record last updated on", - "domain.created" => "Record Created on", + "domain.created" => "Record created on", "domain.expires" => "Record expires on" ); $r = get_blocks($data_str,$items); - if (isset($r["domain"]["sponsor"])) - $r["domain"]["sponsor"]=$r["domain"]["sponsor"][0]; + if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) + $r['domain']['sponsor']=$r['domain']['sponsor'][0]; - $r["owner"] = get_contact($r["owner"]); - $r["admin"] = get_contact($r["admin"]); - $r["tech"] = get_contact($r["tech"]); + $r['owner'] = get_contact($r['owner']); + $r['admin'] = get_contact($r['admin']); + $r['tech'] = get_contact($r['tech']); + $r=format_dates($r,'dmy'); return($r); } diff --git a/registercom.whois b/registercom.whois index 514d5fa..609bcc3 100644 --- a/registercom.whois +++ b/registercom.whois @@ -27,11 +27,12 @@ */ /* registercom.whois 1.0 mark jeftovic 1999/12/26 */ -/* registercom.whois 2.0 david@ols.es 2003/02/18 */ +/* registercom.whois 2.1 david@ols.es 2003/02/18 */ if(!defined("__REGISTERCOM_HANDLER__")) define("__REGISTERCOM_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class registercom extends gtld { @@ -58,6 +59,7 @@ class registercom extends gtld { $r["admin"] = get_contact($r["admin"]); $r["tech"] = get_contact($r["tech"]); $r["zone"] = get_contact($r["zone"]); + $r=format_dates($r,'-mdy'); return($r); } } diff --git a/servers.whois b/servers.whois index c5e5fc0..23777c7 100644 --- a/servers.whois +++ b/servers.whois @@ -71,16 +71,16 @@ $this->WHOIS_PARAM = array( ); $this->HTTPW = array( - "bg" => "http://www.register.bg/bg-nic/displaydomain.pl?domain=#&search=exist", - "es" => "https://www.nic.es/esnic/servlet/WhoisControllerHTML?dominio=#&tipo=dominio", - "co.za" => "http://co.za/cgi-bin/whois.sh?Domain=#", - "fm" => "http://www.dot.fm/query_whois.cfm?domain=#&tld=fm", - "gs" => "http://www.adamsnames.tc/whois/?domain=#", + "bg" => "http://www.register.bg/bg-nic/displaydomain.pl?domain={domain}.{tld}&search=exist", + "es" => "https://www.nic.es/esnic/servlet/WhoisControllerHTML?dominio={domain}.{tld}&tipo=dominio", + "co.za" => "http://co.za/cgi-bin/whois.sh?Domain={domain}.{tld}", + "fm" => "http://www.dot.fm/query_whois.cfm?domain={domain}&tld=fm", + "gs" => "http://www.adamsnames.tc/whois/?domain={domain}.{tld}", "in" => "whois.ncst.ernet.in", - "ms" => "http://www.adamsnames.tc/whois/?domain=#", + "ms" => "http://www.adamsnames.tc/whois/?domain={domain}.{tld}", "net.au" => "whois.aunic.net", - "tc" => "http://www.adamsnames.tc/whois/?domain=#", - "tf" => "http://www.adamsnames.tc/whois/?domain=#", - "vg" => "http://www.adamsnames.tc/whois/?domain=#" + "tc" => "http://www.adamsnames.tc/whois/?domain={domain}.{tld}", + "tf" => "http://www.adamsnames.tc/whois/?domain={domain}.{tld}", + "vg" => "http://www.adamsnames.tc/whois/?domain={domain}.{tld}" ); ?> diff --git a/srsplus.whois b/srsplus.whois index 0c15647..d6908d7 100644 --- a/srsplus.whois +++ b/srsplus.whois @@ -31,6 +31,7 @@ if(!defined("__SRSPLUS_HANDLER__")) define("__SRSPLUS_HANDLER__",1); require_once("generic3.whois"); +require_once('getdate.whois'); class srsplus extends gtld { @@ -40,7 +41,8 @@ class srsplus extends gtld { function parse ($data_str) { - $items = array( "owner" => "Registrant:", + $items = array( + "owner" => "Registrant:", "admin" => "Administrative", "tech" => "Technical", "billing" => "Billing", @@ -52,10 +54,11 @@ class srsplus extends gtld { $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"]); + 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"]); + format_dates($r['domain'],'mdy'); return($r); } diff --git a/stargate.whois b/stargate.whois index 3152f5e..fc88810 100644 --- a/stargate.whois +++ b/stargate.whois @@ -26,11 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* stargate.whois 1.0 David Saez Padros */ +/* stargate.whois 1.1 David Saez Padros */ if(!defined("__STARGATE_HANDLER__")) define("__STARGATE_HANDLER__",1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class stargate extends gtld { @@ -40,21 +41,24 @@ class stargate extends gtld { function parse ($data_str) { - $items = array( "owner" => "Registrant", - "admin" => "Administrative", - "tech" => "Technical", - "billing" => "Billing", - "domain.name" => "Domain Name:", - "domain.nserver." => "Name Servers", - "domain.created" => "Domain Created:", - "domain.expires" => "Domain Expires:" + $items = array( + 'owner' => 'Registrant', + 'admin' => 'Administrative', + 'tech' => 'Technical', + 'billing' => 'Billing', + 'domain.name' => 'Domain Name:', + 'domain.nserver.' => 'Name Servers', + 'domain.created' => 'Creation Date:', + 'domain.expires' => 'Expiration Date:', + 'domain.status' => 'Status:' ); $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['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,'dmy'); return($r); } } diff --git a/test.txt b/test.txt index f199431..a2feb66 100644 --- a/test.txt +++ b/test.txt @@ -2,6 +2,7 @@ atnic nic.at aunic telstra.com.au +benic nic.be brnic registro.br chnic creart.ch blaueskreuz.ch cira cira.ca (v) @@ -10,8 +11,10 @@ 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 @@ -31,16 +34,18 @@ dotregistrar dotregistrar.com dotster dotster.com enom enom.com godaddy godaddy.com -joker managerialanalyzer.com +joker joker.com innerwise sexido.com interdomain interdominio.com -inwwcom ? -moniker kaka.com -netsol olsns.com +inwwcom inww.com +moniker moniker.com +netsol networksolutions.com nicline nicline.com opensrsnet tucows.com registercom register.com +schlund schlund.com srsplus srsplus.com +stargate stargate.com tvcorp sex.tv wwd iprocommunicator.com diff --git a/tvcorp.whois b/tvcorp.whois index 7334d7b..424a09e 100644 --- a/tvcorp.whois +++ b/tvcorp.whois @@ -26,11 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* tvcorp.whois 1.0 David Saez Padros */ +/* tvcorp.whois 1.1 David Saez Padros */ -if(!defined("__TVCORP_HANDLER__")) define("__TVCORP_HANDLER__",1); +if(!defined('__TVCORP_HANDLER__')) define('__TVCORP_HANDLER__',1); -require_once("generic3.whois"); +require_once('generic3.whois'); +require_once('getdate.whois'); class tvcorp extends gtld { @@ -40,20 +41,25 @@ class tvcorp extends gtld { function parse ($data_str) { - $items = array( "owner" => "Registrant", - "admin" => "Administrative", - "tech" => "Technical", - "billing" => "Billing", - "domain.nserver." => "Domain servers:", - "domain.created" => "Record created on", - "domain.expires" => "Record expires on" + $items = array( + 'owner' => 'Registrant', + 'admin' => 'Admin', + 'tech' => 'Technical', + 'billing' => 'Billing', + 'domain.nserver.' => 'Domain servers:', + 'domain.created' => 'Record created on', + 'domain.expires' => 'Record expires 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['owner'] = get_contact($r['owner']); + $r['admin'] = get_contact($r['admin']); + $r['tech'] = get_contact($r['tech']); + + if (isset($r['billing'])) + $r['billing'] = get_contact($r['billing']); + + $r=format_dates($r,'myd'); return($r); } } diff --git a/uknic.whois b/uknic.whois index 82011da..61bef97 100644 --- a/uknic.whois +++ b/uknic.whois @@ -37,6 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if(!defined("__UKNIC_HANDLER__")) define("__UKNIC_HANDLER__",1); +require_once('getdate.whois'); + class uknic extends Whois { function uknic($data) { @@ -53,12 +55,12 @@ class uknic extends Whois { "domain.changed" => "Last updated:" ); - $r["rawdata"]=$data_str["rawdata"]; + $r['rawdata']=$data_str['rawdata']; while (list($key, $val)=each($data_str["rawdata"])) { $val=trim($val); - if ($val!="") { + if ($val!='') { if ($val=="Name servers listed in order:") { while (list($key, $val)=each($data_str["rawdata"])) { if (!($value=trim($val))) break; @@ -87,8 +89,8 @@ class uknic extends Whois { } } - $r["regyinfo"]["referrer"]="http://www.nic.uk"; - $r["regyinfo"]["registrar"]="Nominet UK"; + $r['regyinfo']['referrer']='http://www.nic.uk'; + $r['regyinfo']['registrar']='Nominet UK'; if (!empty($r["regrinfo"]["domain"]["name"])) { $r["regrinfo"]["registered"] = "yes"; @@ -105,6 +107,7 @@ class uknic extends Whois { else $r["regrinfo"]["registered"] = "no"; + format_dates($r,'dmy'); return($r); } diff --git a/wsnic.whois b/wsnic.whois index c9bf5b8..055d2ae 100644 --- a/wsnic.whois +++ b/wsnic.whois @@ -8,6 +8,8 @@ if(!defined("__WSNIC_HANDLER__")) define("__WSNIC_HANDLER__",1); +require_once('getdate.whois'); + class wsnic extends Whois { function wsnic($data) { $this->result=$this->parse($data); @@ -72,6 +74,7 @@ class wsnic extends Whois { else $r["regrinfo"]["registered"] = "no"; + format_dates($r,'ymd'); return($r); } }