Question

OK I have looked everywhere and cant find this one out.

I have a Windows XP, made into a server and i have created a webpage in PHP that display's the current IP Address, OS and current Browser, I am using the command $_SERVER['HTTP_USER_AGENT'], which work's but it's missing one part that I need. When run the command I get the string of

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0'

But for the OS on a Mac, i need the revision as well.

For example Installed of Intel Mac OS X 10.8 - I want Intel Mac OS X 10.8.2

I need the extra 2 in the Mac OS Version.

I can run a sw_vers command but don't know how to get into variable through PHP.

Any ideas ??

Cheers

James

Was it helpful?

Solution

This is probably not possible. Its up to the users browser as to what It wants to tell your PHP server abouts its self.

If its not willing to tell you what minor version of the OS it's running theres no way to get it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top