Get country & organization name

This commit is contained in:
sparc 2012-03-29 10:12:57 +00:00
parent 330ab867db
commit db5e5fdfcc

View file

@ -47,9 +47,19 @@ class markmonitor_handler
);
$r = easy_parser($data_str, $items, 'dmy', false, false, true);
if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor']))
$r['domain']['sponsor'] = $r['domain']['sponsor'][0];
$r['domain']['sponsor'] = $r['domain']['sponsor'][0];
foreach($r as $key => $part)
{
if (isset($part['address']))
{
$r[$key]['organization'] = array_shift($r[$key]['address']);
$r[$key]['address']['country'] = array_pop($r[$key]['address']);
}
}
return $r;
}
}
?>
?>