Fixed & updated

This commit is contained in:
David Saez 2018-05-03 10:04:28 +02:00
parent 8c6a186867
commit 7691a8beb9
6 changed files with 82 additions and 70 deletions

View file

@ -34,34 +34,35 @@ class be_handler
{
function parse($data, $query)
{
$items = array(
'domain.name' => 'Domain:',
'domain.status' => 'Status:',
'domain.nserver' => 'Nameservers:',
'domain.created' => 'Registered:',
'owner' => 'Licensee:',
'admin' => 'Onsite Contacts:',
'tech' => 'Registrar Technical Contacts:',
'agent' => 'Registrar:',
'agent.uri' => 'Website:'
);
$items = [
'domain.name' => 'Domain:',
'domain.status' => 'Status:',
'domain.nserver' => 'Nameservers:',
'domain.created' => 'Registered:',
'owner' => 'Registrant:',
'tech' => 'Registrar Technical Contacts:',
'registrar' => 'Registrar:',
//'agent.name' => 'Name:',
'agent.uri' => 'Website:'
];
$trans = array(
'company name2:' => ''
);
$trans = [
'company name2:' => ''
];
$r['regrinfo'] = get_blocks($data['rawdata'], $items);
if ($r['regrinfo']['domain']['status'] == 'REGISTERED')
if ($r['regrinfo']['domain']['status'] == 'NOT AVAILABLE')
{
$r['regrinfo']['registered'] = 'yes';
$r['regrinfo'] = get_contacts($r['regrinfo'],$trans);
$r['regrinfo'] = get_contacts($r['regrinfo'], $trans);
if (isset($r['regrinfo']['agent']))
if (isset($r['regrinfo']['registrar']))
{
$sponsor = get_contact($r['regrinfo']['agent'],$trans);
$sponsor = get_contact($r['regrinfo']['registrar'], $trans);
$r['regrinfo']['domain']['sponsor'] = array_merge($sponsor, $r['regrinfo']['agent']);
unset($r['regrinfo']['registrar']);
unset($r['regrinfo']['agent']);
$r['regrinfo']['domain']['sponsor'] = $sponsor;
}
$r = format_dates($r, '-mdy');
@ -74,4 +75,3 @@ class be_handler
return $r;
}
}
?>

View file

@ -34,21 +34,22 @@ class cn_handler
{
function parse($data_str, $query)
{
$items = array(
$items = [
'Domain Name:' => 'domain.name',
'Domain Status:' => 'domain.status.',
'DNSSEC:' => 'domain.dnssec',
'ROID:' => 'domain.handle',
'Name Server:' => 'domain.nserver.',
'Registration Date:' => 'domain.created',
'Expiration Date:' => 'domain.expires',
'Registration Time:' => 'domain.created',
'Expiration Time:' => 'domain.expires',
'Sponsoring Registrar:' => 'domain.sponsor',
'Registrant Name:' => 'owner.name',
'Registrant:' => '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 Contact Email:' => 'owner.email',
'Registrant Phone Number:' => 'owner.phone',
'Registrant Fax:' => 'owner.fax',
'Administrative Name:' => 'admin.name',
@ -78,14 +79,13 @@ class cn_handler
'Billing Email:' => 'billing.email',
'Billing Phone Number:' => 'billing.phone',
'Billing Fax:' => 'billing.fax'
);
];
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, 'ymd');
$r['regyinfo'] = array(
$r['regyinfo'] = [
'referrer' => 'http://www.cnnic.net.cn',
'registrar' => 'China NIC'
);
];
return $r;
}
}
?>

View file

@ -34,10 +34,16 @@ class co_handler
{
function parse($data_str, $query)
{
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], false, '-md--y');
$items = [
'Registrar:' => 'domain.sponsor',
'Registry Expiry Date:' => 'domain.expires',
'Updated Date:' => 'domain.changed',
'Creation Date:' => 'domain.created',
];
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, 'Y-m-d');
$r['regyinfo']['referrer'] = 'http://www.cointernet.com.co/';
$r['regyinfo']['registrar'] = '.CO Internet, S.A.S.';
return $r;
}
}
?>

View file

@ -34,45 +34,46 @@ class de_handler
{
function parse($data_str, $query)
{
$items = array(
'domain.name' => 'Domain:',
'domain.nserver.' =>'Nserver:',
'domain.nserver.#' =>'Nsentry:',
'domain.status' => 'Status:',
'domain.changed' => 'Changed:',
$items = [
'domain.name' => 'Domain:',
'domain.nserver.' => 'Nserver:',
'domain.nserver.#' => 'Nsentry:',
'domain.status' => 'Status:',
'domain.changed' => 'Changed:',
'domain.desc.' => 'Descr:',
'owner' => '[Holder]',
'admin' => '[Admin-C]',
'tech' => '[Tech-C]',
'zone' => '[Zone-C]'
);
'owner' => '[Holder]',
'admin' => '[Admin-C]',
'tech' => '[Tech-C]',
'zone' => '[Zone-C]'
];
$extra = array(
$extra = [
'city:' => 'address.city',
'postalcode:' => 'address.pcode',
'countrycode:' => 'address.country',
'remarks:' => '',
'sip:' => 'sip',
'type:' => ''
);
'type:' => '',
'address:' => 'address.street.'
];
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd',$extra);
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
$r['regyinfo'] = array(
$r['regyinfo'] = [
'registrar' => 'DENIC eG',
'referrer' => 'http://www.denic.de/'
);
];
if (!isset($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == "free")
if (!isset($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == 'free')
{
$r['regrinfo']['registered'] = 'no';
}
else
$r['regrinfo']['registered'] = 'no';
}
else
{
$r['regrinfo']['domain']['changed'] = substr($r['regrinfo']['domain']['changed'], 0, 10);
$r['regrinfo']['registered'] = 'yes';
}
return $r;
}
}
?>

View file

@ -34,24 +34,29 @@ class fi_handler
{
function parse($data_str, $query)
{
$items = array(
'domain:' => 'domain.name',
'created:' => 'domain.created',
'expires:' => 'domain.expires',
'status:' => 'domain.status',
'nserver:' => 'domain.nserver.',
'descr:' => 'owner.name.',
'address:' => 'owner.address.',
'phone:' => 'owner.phone',
);
$items = [
'domain.............:' => 'domain.name',
'created............:' => 'domain.created',
'expires............:' => 'domain.expires',
'status.............:' => 'domain.status',
'modified...........:' => 'domain.changed',
'RegistryLock.......:' => 'domain.lock',
'nserver............:' => 'domain.nserver.',
'registrar..........:' => 'domain.sponsor',
'dnssec.............:' => 'domain.dnssec',
'name...............:' => 'owner.name',
'address............:' => 'owner.address.',
'phone..............:' => 'owner.phone',
'register number....:' => 'owner.handle',
'holder email.......:' => 'owner.email'
];
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items);
$r['regyinfo'] = array(
'referrer' => 'https://domain.ficora.fi/',
'registrar' => 'Finnish Communications Regulatory Authority'
);
$r['regyinfo'] = [
'referrer' => 'https://domain.ficora.fi/',
'registrar' => 'Finnish Communications Regulatory Authority'
];
return $r;
}
}
?>

File diff suppressed because one or more lines are too long