-
-
-
Countries by unique visitors
-
-
-
-
-
-
-
-
Top isps ordered by networks
-
+
@@ -254,13 +320,7 @@
From a4d91e0b3e0fc283b2bf8f118236cb67e82c6dd2 Mon Sep 17 00:00:00 2001
From: Thomas Beranek <52349197+beranek1@users.noreply.github.com>
Date: Mon, 26 Aug 2019 22:09:23 +0200
Subject: [PATCH 3/7] Update webstatistics.php
---
webstatistics.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webstatistics.php b/webstatistics.php
index 85d1c4e..6b154b6 100644
--- a/webstatistics.php
+++ b/webstatistics.php
@@ -97,7 +97,7 @@
$last_visitors_by_weekday = array();
foreach($web_analytics_db->query("SELECT `time`, `browser_id` FROM wa_requests ORDER BY `time` ASC LIMIT 1000;") as $request) {
$time = $request[0];
- $daytime = date("h:00", strtotime($time));
+ $daytime = date("H:00", strtotime($time));
$day = date("Y-m-d", strtotime($time));
$weekday = date("l", strtotime($time));
if(isset($last_requests[$time])) {
From 1d714ef01cf54ab3db00c110fa4f9110a4e6e1ab Mon Sep 17 00:00:00 2001
From: Thomas Beranek <52349197+beranek1@users.noreply.github.com>
Date: Tue, 27 Aug 2019 22:11:57 +0200
Subject: [PATCH 4/7] Update webstatistics.php
---
webstatistics.php | 192 ++++++++++++++++++++++++++++++++--------------
1 file changed, 135 insertions(+), 57 deletions(-)
diff --git a/webstatistics.php b/webstatistics.php
index 6b154b6..f87a242 100644
--- a/webstatistics.php
+++ b/webstatistics.php
@@ -48,6 +48,8 @@
$top_continents["?"] = $country[1];
}
}
+$top_origins = array_merge($top_countries, $top_continents);
+asort($top_origins);
arsort($top_continents);
$total_countries = 0;
$top_countriesvo = array();
@@ -70,12 +72,12 @@
}
}
$top_useragents = array();
-foreach($web_analytics_db->query("SELECT `user_agent`, COUNT(*) FROM wa_browsers GROUP BY `user_agent` ORDER BY COUNT(*) DESC;") as $useragent) {
+foreach($web_analytics_db->query("SELECT `user_agent`, COUNT(*) FROM wa_browsers GROUP BY `user_agent` ORDER BY COUNT(*) DESC LIMIT 10;") as $useragent) {
$top_useragents[$useragent[0]] = $useragent[1];
}
$total_isps = 0;
$top_isps = array();
-foreach($web_analytics_db->query("SELECT `isp`, COUNT(*) FROM wa_ips GROUP BY `isp` ORDER BY COUNT(*) DESC;") as $isp) {
+foreach($web_analytics_db->query("SELECT `isp`, COUNT(*) FROM wa_ips GROUP BY `isp` ORDER BY COUNT(*) DESC LIMIT 10;") as $isp) {
if($isp[0] != "" && $isp[0] != null) {
$top_isps[$isp[0]] = $isp[1];
$total_isps++;
@@ -84,7 +86,7 @@
}
}
$top_uris = array();
-foreach($web_analytics_db->query("SELECT `uri`, COUNT(*) FROM wa_requests GROUP BY `uri` ORDER BY COUNT(*) DESC;") as $uri) {
+foreach($web_analytics_db->query("SELECT `uri`, COUNT(*) FROM wa_requests GROUP BY `uri` ORDER BY COUNT(*) DESC LIMIT 10;") as $uri) {
$top_uris[$uri[0]] = $uri[1];
}
$last_requests = array();
@@ -97,8 +99,8 @@
$last_visitors_by_weekday = array();
foreach($web_analytics_db->query("SELECT `time`, `browser_id` FROM wa_requests ORDER BY `time` ASC LIMIT 1000;") as $request) {
$time = $request[0];
- $daytime = date("H:00", strtotime($time));
- $day = date("Y-m-d", strtotime($time));
+ $daytime = date("[H, 0, 0]", strtotime($time));
+ $day = date("Y, m, d", strtotime($time));
$weekday = date("l", strtotime($time));
if(isset($last_requests[$time])) {
$last_requests[$time] += 1;
@@ -175,11 +177,14 @@
Home (current)
- Requests
+ Traffic
Visitors
+
+ Origin
+