CodeIgniter Forums

Full Version: config/user_agents.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, Is it possible for the for platforms to detect what version of Mac OS X is being used?
$_SERVER['HTTP_USER_AGENT']

Has the OS version in it.
(08-17-2018, 09:32 PM)donpwinston Wrote: [ -> ]$_SERVER['HTTP_USER_AGENT']

Has the OS version in it.

No, I want to be able to tell what version of MAC OS a user is on. Like Windows tells you if the user is on Windows 10, Windows 7, Windows 8 and so on. I want to do the same for Mac OS X are they on MacOS 10.13, MacOS 10.14, MacOS 10.15 and so on. The user agent script does not break it down like that.
I get

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

It has the OS version in it. What's printed depends on the browser.