Get country & organization name
This commit is contained in:
parent
330ab867db
commit
db5e5fdfcc
1 changed files with 12 additions and 2 deletions
|
@ -47,8 +47,18 @@ 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];
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue