mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 20:24:10 +01:00
Added radar graph for top clients
This commit is contained in:
17
data.php
17
data.php
@@ -100,6 +100,23 @@
|
||||
|
||||
}
|
||||
|
||||
function getQuerySources() {
|
||||
$log = readInLog();
|
||||
$dns_queries = getDnsQueries($log);
|
||||
$sources = array();
|
||||
foreach($dns_queries as $query) {
|
||||
$exploded = explode(" ", $query);
|
||||
$ip = trim($exploded[count($exploded)-1]);
|
||||
if (isset($sources[$ip])) {
|
||||
$sources[$ip]++;
|
||||
}
|
||||
else {
|
||||
$sources[$ip] = 1;
|
||||
}
|
||||
}
|
||||
return $sources;
|
||||
}
|
||||
|
||||
/******** Private Members ********/
|
||||
function readInBlockList() {
|
||||
global $domains;
|
||||
|
||||
Reference in New Issue
Block a user