note 115036 deleted from function.get-browser by cmb

From: Date: Sun, 23 Feb 2020 09:00:13 +0000
Subject: note 115036 deleted from function.get-browser by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-214207@lists.php.net to get a copy of this message
Note Submitter: ibi at tlr dot de ---- @ruudrp: you might want to distinguish the OS even further: (at least for windows that is) elseif (preg_match('/windows|win32/i', $u_agent)) { $platform = 'Windows'; if (preg_match('/NT 6.2/i', $u_agent)) { $platform .= ' 8'; } elseif (preg_match('/NT 6.3/i', $u_agent)) { $platform .= ' 8.1'; } elseif (preg_match('/NT 6.1/i', $u_agent)) { $platform .= ' 7'; } elseif (preg_match('/NT 6.0/i', $u_agent)) { $platform .= ' Vista'; } elseif (preg_match('/NT 5.1/i', $u_agent)) { $platform .= ' XP'; } elseif (preg_match('/NT 5.0/i', $u_agent)) { $platform .= ' 2000'; } if (preg_match('/WOW64/i', $u_agent) || preg_match('/x64/i', $u_agent)) { $platform .= ' (x64)'; } }

« previous php.notes (#214207) next »