added uniform date format and some handler fixes

This commit is contained in:
sparc 2005-07-16 11:14:22 +00:00
parent 65b65e0cc0
commit 99f4456b92
47 changed files with 320 additions and 233 deletions

View file

@ -1,3 +1,17 @@
2005/07/16 David Saez <david@ols.es>
- 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 <david@ols.es>
- 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 <david@ols.es>
- added handler for TV CORPORATION

View file

@ -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

View file

@ -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);
}
}

View file

@ -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"]);

View file

@ -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;
}
}

View file

@ -26,9 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* benic.whois 1.0 Matthijs Koot <koot@cyberwar.nl> */
/* 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';

View file

@ -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");

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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" );

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}
}

View file

@ -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;
}
}

View file

@ -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);
}
}

View file

@ -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"];

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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;
}
}

View file

@ -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();

View file

@ -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']);

View file

@ -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 <david@ols.es> */
/* joker.whois 1.10 David Saez <david@ols.es> */
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);

View file

@ -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);
}
}

View file

@ -26,11 +26,12 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* moniker.whois 1.0 David Saez Padros <david@ols.es> */
/* moniker.whois 1.1 David Saez Padros <david@ols.es> */
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);
}
}

View file

@ -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);
}

View file

@ -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);
}
}
?>

View file

@ -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 <brian@macserve.net> */
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);
}

View file

@ -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." );

View file

@ -27,11 +27,13 @@
*/
/* NICLINE.whois 1.0 Carlos Galvez <cgalvez@espaciowww.com> */
/* 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);
}
}
?>

View file

@ -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"];

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -1,4 +1,4 @@
<?php
+<?php
/*
Whois2.php PHP classes to conduct whois queries
@ -27,11 +27,12 @@
*/
/* opensrsnet.whois 1.0 jeremiah bellomy 2000/04/06 */
/* opensrsnet.whois 2.0 david@ols.es 2003/02/15 */
/* opensrsnet.whois 2.1 david@ols.es 2003/02/15 */
if(!defined("__OPENSRSNET_HANDLER__")) define("__OPENSRSNET_HANDLER__",1);
require_once("generic3.whois");
require_once('generic3.whois');
require_once('getdate.whois');
class opensrsnet extends gtld {
@ -45,21 +46,22 @@ class opensrsnet extends gtld {
"admin" => "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);
}

View file

@ -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);
}
}

View file

@ -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}"
);
?>

View file

@ -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);
}

View file

@ -26,11 +26,12 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* stargate.whois 1.0 David Saez Padros <david@ols.es> */
/* stargate.whois 1.1 David Saez Padros <david@ols.es> */
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);
}
}

View file

@ -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

View file

@ -26,11 +26,12 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* tvcorp.whois 1.0 David Saez Padros <david@ols.es> */
/* tvcorp.whois 1.1 David Saez Padros <david@ols.es> */
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);
}
}

View file

@ -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);
}

View file

@ -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);
}
}