some fixes

This commit is contained in:
sparc 2011-06-24 10:22:30 +00:00
parent f08f43e0bf
commit 9884d78642
5 changed files with 69 additions and 6 deletions

View file

@ -4,6 +4,8 @@
- fixed .eu hanlder (bug #3297823)
- fixed .ae handler (bug #3181964)
- fixed .uk handler (partial patch # 3314417)
- fixed .ru handler (bug #3178123)
- added handler for .ir
2011/01/26
- fixed .se handler (bug #3165639)

View file

@ -32,10 +32,8 @@ require_once('whois.parser.php');
class ie_handler
{
function parse($data_str, $query)
{
$translate = array(
'nic-hdl' => 'handle',
'person' => 'name',
@ -61,7 +59,7 @@ class ie_handler
}
$r['regrinfo'] = $reg;
return ($r);
return $r;
}
}
?>

62
src/whois.ir.php Normal file
View file

@ -0,0 +1,62 @@
<?php
/**
* PHPWhois IR Lookup Extension - http://github.com/sepehr/phpwhois-ir
*
* An extension to PHPWhois (http://phpwhois.org) library to support IR lookups.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Define the handler flag.
if (!defined('__IR_HANDLER__'))
define('__IR_HANDLER__', 1);
// Loadup the parser.
require_once('whois.parser.php');
/**
* IR Domain names lookup handler class.
*/
class ir_handler
{
function parse($data_str, $query)
{
$translate = array(
'nic-hdl' => 'handle',
'org' => 'organization',
'e-mail' => 'email',
'person' => 'name',
'fax-no' => 'fax',
'domain' => 'name'
);
$contacts = array(
'admin-c' => 'admin',
'tech-c' => 'tech',
'holder-c' => 'owner'
);
$r['regyinfo'] = array(
'referrer'=>'http://whois.nic.ir/',
'registrar' => 'NIC-IR'
);
$reg = generic_parser_a($data_str['rawdata'], $translate, $contacts, 'domain', 'Ymd');
$r['regrinfo'] = $reg;
return ($r);
}
}

View file

@ -49,8 +49,7 @@ class nl_handler
'domain.sponsor' => 'Record maintained:',
'owner' => 'Registrar:',
'admin' => 'Administrative contact:',
'tech' => 'Technical contact(s):',
'zone' => 'Registrar:'
'tech' => 'Technical contact(s):'
);
$r['regrinfo'] = get_blocks($data['rawdata'], $items);
@ -77,7 +76,6 @@ class nl_handler
$r['regrinfo']['registered'] = 'yes';
format_dates($r, 'dmy');
return ($r);
}

View file

@ -53,6 +53,9 @@ class ru_handler
$r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, 'dmy');
if (empty($r['regrinfo']['domain']['status']))
$r['regrinfo']['registered'] = 'no';
$r['regyinfo'] = array(
'referrer' => 'http://www.ripn.net',
'registrar' => 'RUCENTER-REG-RIPN'