fixes to ip handler and APNIC ip handler
This commit is contained in:
parent
071b052541
commit
48a3ff5d89
3 changed files with 31 additions and 25 deletions
|
@ -1,3 +1,6 @@
|
|||
2007/05/04
|
||||
- fixes to ip handler and APNIC ip handler
|
||||
|
||||
2007/05/03
|
||||
- minox fix in whois.gtld.publicdomainregistry.php
|
||||
- removed unused handler whois.gtld.directi.php
|
||||
|
|
|
@ -53,14 +53,29 @@ class apnic_handler {
|
|||
|
||||
$r = generic_parser_a($data_str,$translate,$contacts,'network','Ymd');
|
||||
|
||||
if (isset($r['network']['desc'][0]))
|
||||
if (isset($r['network']['desc']))
|
||||
{
|
||||
$r['owner']['organization'] = $r['network']['desc'][0];
|
||||
unset($r['network']['desc'][0]);
|
||||
}
|
||||
if (is_array($r['network']['desc']))
|
||||
{
|
||||
$r['owner']['organization'] = array_shift($r['network']['desc']);
|
||||
$r['owner']['address'] = $r['network']['desc'];
|
||||
if (isset($r['network']['desc'])) unset($r['network']['desc']);
|
||||
if (isset($r['network']['address'])) unset($r['network']['address']);
|
||||
}
|
||||
else
|
||||
$r['owner']['organization'] = $r['network']['desc'];
|
||||
|
||||
unset($r['network']['desc']);
|
||||
}
|
||||
|
||||
if (isset($r['network']['address']))
|
||||
{
|
||||
if (isset($r['owner']['address']))
|
||||
$r['owner']['address'][] = $r['network']['address'];
|
||||
else
|
||||
$r['owner']['address'] = $r['network']['address'];
|
||||
|
||||
unset($r['network']['address']);
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,19 +107,14 @@ class ip_handler extends WhoisClient
|
|||
case 'whois.apnic.net':
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
||||
if (empty($rawdata))
|
||||
{
|
||||
//$rawdata = $data['rawdata'];
|
||||
break;
|
||||
}
|
||||
|
||||
$result = $this->set_whois_info($result);
|
||||
if (empty($rawdata)) break;
|
||||
|
||||
while (list($ln, $line) = each($rawdata))
|
||||
{
|
||||
if (strstr($line, 'KRNIC whois server at whois.krnic.net') ||
|
||||
strstr($line, 'KRNIC-KR'))
|
||||
{
|
||||
$result = $this->set_whois_info($result);
|
||||
$this->Query['server'] = 'whois.krnic.net';
|
||||
$result['regyinfo']['registrar'] = 'Korea Network Information Center (KRNIC)';
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
@ -155,6 +150,7 @@ class ip_handler extends WhoisClient
|
|||
|
||||
if ($newquery != '')
|
||||
{
|
||||
$result = $this->set_whois_info($result);
|
||||
$result['regyinfo']['netname'] = $newquery;
|
||||
|
||||
if (strstr($newquery, 'BRAZIL-BLK'))
|
||||
|
@ -175,10 +171,7 @@ class ip_handler extends WhoisClient
|
|||
case 'whois.lacnic.net':
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
||||
if (empty($rawdata))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (empty($rawdata)) break;
|
||||
|
||||
while (list($ln, $line) = each($rawdata))
|
||||
{
|
||||
|
@ -192,6 +185,7 @@ class ip_handler extends WhoisClient
|
|||
|
||||
if ($s != '')
|
||||
{
|
||||
$result = $this->set_whois_info($result);
|
||||
$this->Query['server'] = 'whois.registro.br';
|
||||
$result['regyinfo']['registrar'] = 'Comite Gestor da Internet do Brazil';
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
@ -203,16 +197,13 @@ class ip_handler extends WhoisClient
|
|||
case 'whois.ripe.net':
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
||||
if (empty($rawdata))
|
||||
{
|
||||
//$rawdata = $data['rawdata'];
|
||||
break;
|
||||
}
|
||||
if (empty($rawdata)) break;
|
||||
|
||||
while (list($ln, $line) = each($rawdata))
|
||||
{
|
||||
if (strstr($line, 'AFRINIC-NET-TRANSFERRED-'))
|
||||
{
|
||||
$result = $this->set_whois_info($result);
|
||||
$this->Query['server'] = 'whois.afrinic.net';
|
||||
$result['regyinfo']['registrar'] = 'African Network Information Center';
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
@ -223,9 +214,6 @@ class ip_handler extends WhoisClient
|
|||
|
||||
default:
|
||||
$rawdata = $this->GetRawData($query);
|
||||
|
||||
//if (empty($rawdata))
|
||||
// $rawdata = $data['rawdata'];
|
||||
}
|
||||
|
||||
if (empty($rawdata))
|
||||
|
|
Loading…
Reference in a new issue