From f2a3299ef07b1bb2c90595126fe4e7033dc2f628 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 12 Sep 2024 12:13:51 -0400 Subject: [PATCH] Update getOS Function to include Windows 11, Fix get Web Browser when using Microsoft Edge --- blank.php | 3 +++ functions.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/blank.php b/blank.php index 72d5b54d..60a09901 100644 --- a/blank.php +++ b/blank.php @@ -19,6 +19,9 @@ $start_date = date('Y') . "-10-10"; echo "

$start_date

"; +echo "

User Agent

"; +echo getUserAgent(); + ?>
diff --git a/functions.php b/functions.php index 55a0f151..0c48f032 100644 --- a/functions.php +++ b/functions.php @@ -109,7 +109,7 @@ function getWebBrowser($user_browser) '/firefox/i' => " Firefox", '/safari/i' => " Safari", '/chrome/i' => " Chrome", - '/edge/i' => " Edge", + '/edg/i' => " Edge", '/opera/i' => " Opera" ); foreach ($browser_array as $regex => $value) { @@ -124,6 +124,7 @@ function getOS($user_os) { $os_platform = "Unknown OS"; $os_array = array( + '/windows nt 11/i' => " Windows 11", '/windows nt 10/i' => " Windows 10", '/windows nt 6.3/i' => " Windows 8.1", '/windows nt 6.2/i' => " Windows 8",