added am handler
This commit is contained in:
parent
0a3877e60d
commit
1bff4b2cc0
2 changed files with 43 additions and 0 deletions
42
src/whois.am.php
Normal file
42
src/whois.am.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
if (!defined('__AM_HANDLER__'))
|
||||
define('__AM_HANDLER__', 1);
|
||||
|
||||
require_once('whois.parser.php');
|
||||
|
||||
class am_handler
|
||||
{
|
||||
function parse($data_str, $query)
|
||||
{
|
||||
$items = array(
|
||||
'owner' => 'Registrant:',
|
||||
'domain.name' => 'Domain name:',
|
||||
'domain.created' => 'Registered:',
|
||||
'domain.changed' => 'Last modified:',
|
||||
'domain.nserver' => 'DNS servers:',
|
||||
'domain.status' => 'Status:',
|
||||
'tech' => 'Technical contact:',
|
||||
'admin' => 'Administrative contact:',
|
||||
);
|
||||
|
||||
$r['regrinfo'] = get_blocks($data_str['rawdata'], $items);
|
||||
|
||||
if (!empty($r['regrinfo']['domain']['name']))
|
||||
{
|
||||
$r['regrinfo'] = get_contacts($r['regrinfo'],$trans);
|
||||
$r['regrinfo']['registered'] = 'yes';
|
||||
}
|
||||
else
|
||||
{
|
||||
$r = '';
|
||||
$r['regrinfo']['registered'] = 'no';
|
||||
}
|
||||
|
||||
$r['regyinfo'] = array(
|
||||
'referrer' => 'http://www.isoc.am',
|
||||
'registrar' => 'ISOCAM'
|
||||
);
|
||||
|
||||
return $r;
|
||||
}
|
||||
}
|
1
test.txt
1
test.txt
|
@ -2,6 +2,7 @@
|
|||
|
||||
ae nic.ae
|
||||
ag nic.ag
|
||||
am isoc.am
|
||||
at nic.at
|
||||
au telstra.com.au
|
||||
be nic.be
|
||||
|
|
Loading…
Reference in a new issue