mirror of
https://github.com/pi-hole/web.git
synced 2026-04-28 12:44:07 +01:00
Merge pull request #765 from pi-hole/tweak/client-names
Use new `client-names` FTL response format
This commit is contained in:
@@ -336,9 +336,11 @@ else
|
||||
$client_names = array();
|
||||
foreach($return as $line)
|
||||
{
|
||||
$tmp = explode(" ",$line);
|
||||
// returned data is in format: "ID count hostname"
|
||||
$client_names[intval($tmp[0])] = $tmp[2];
|
||||
$tmp = explode(" ", $line);
|
||||
$client_names[] = array(
|
||||
"name" => $tmp[0],
|
||||
"ip" => $tmp[1]
|
||||
);
|
||||
}
|
||||
|
||||
$result = array('clients' => $client_names);
|
||||
|
||||
Reference in New Issue
Block a user