From: Malte Bublitz Date: Wed, 24 Jan 2024 17:48:28 +0000 (+0100) Subject: PS4-Browser und -OS wird wieder korrekt erkannt, inkl. jeweiliger Versionsnummern X-Git-Url: https://git.rt3x.de/?a=commitdiff_plain;p=ip.malte70.de.git PS4-Browser und -OS wird wieder korrekt erkannt, inkl. jeweiliger Versionsnummern --- diff --git a/clientinfo.class.php b/clientinfo.class.php index 5fd4a76..d0324a1 100644 --- a/clientinfo.class.php +++ b/clientinfo.class.php @@ -242,11 +242,11 @@ class ClientInfo { $this->browser = "PlayStation 4 Browser"; $pos_version_start = stripos( $ua, - "PlayStation 4 " - ) + strlen("PlayStation 4 "); + "Version/" + ) + strlen("Version/"); $pos_version_end = stripos( $ua, - ")", + " ", $pos_version_start ); $version = substr( @@ -413,8 +413,23 @@ class ClientInfo { $pos_version_start, $pos_version_end - $pos_version_start ); + } elseif (stripos($ua, "PlayStation 4") !== false) { - $this->OS = "PlayStation 4 System"; + $this->OS = "PlayStation 4 System "; + $pos_version_start = stripos( + $ua, + "PlayStation 4/" + ) + strlen("PlayStation 4/"); + $pos_version_end = stripos( + $ua, + ")", + $pos_version_start + ); + $this->OS .= substr( + $ua, + $pos_version_start, + $pos_version_end - $pos_version_start + ); } elseif (stripos($ua, "FreeBSD") !== false) { $this->OS = "FreeBSD";