From 11094c8c38c156cfa17b7c66835b22f40232efc0 Mon Sep 17 00:00:00 2001 From: Thomas Beranek <52349197+beranek1@users.noreply.github.com> Date: Wed, 14 Aug 2019 21:11:35 +0200 Subject: [PATCH 1/7] Update webstatistics.php --- webstatistics.php | 430 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 301 insertions(+), 129 deletions(-) diff --git a/webstatistics.php b/webstatistics.php index 8ae22d2..fc8bcf1 100644 --- a/webstatistics.php +++ b/webstatistics.php @@ -87,6 +87,16 @@ foreach($web_analytics_db->query("SELECT `uri`, COUNT(*) FROM wa_requests GROUP BY `uri` ORDER BY COUNT(*) DESC;") as $uri) { $top_uris[$uri[0]] = $uri[1]; } +$last_requests = array(); +$last_visitors = array(); +foreach($web_analytics_db->query("SELECT `time`, `browser_id` FROM wa_requests ORDER BY `time` ASC LIMIT 1000;") as $request) { + $time = $request[0]; + if(isset($last_requests[$time])) { + $last_requests[$time] += 1; + } else { + $last_requests[$time] = 1; + } +} ?> @@ -99,143 +109,305 @@ -