Page 1 of 1
Operating System Detection
Posted: Mon May 02, 2005 8:43 am
by pbritten
Greetings!
Would someone please help me with OS detection. I'm doing some CSS development that breaks in Mac, and need to create a second stylesheet to accomodate the differences.
I've read the manual and searched the forums of this site to no avail.
Thank you for your help with this.
Pat
Posted: Mon May 02, 2005 8:47 am
by Chris Corbyn
You should be able to get some information from
But that is an optional header and so it wont always be there.
If you:
Code: Select all
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
You should get a pretty good idea of what you can pick up from the HTTP Request

Posted: Mon May 02, 2005 1:52 pm
by pbritten
Thank you for your reply. Unfortunately, the result provided quite a laundry list, but no platform. The User_Agent did list browser types, but I was hoping for something more direct re the user machines platform.
Did I miss something?
Pat
Posted: Mon May 02, 2005 4:23 pm
by shiznatix
a quick google search turned up this
http://techpatterns.com/downloads/php_b ... p#php_full
but i didnt look at it extensivly
p.s. pbritten, if you know allison legheart or ben smith (both goto PSU) say hello to em for me!
Posted: Mon May 02, 2005 8:29 pm
by pbritten
Thank you, shiznatix. I never thought of using Google for problems like this; always looked for help in the forums.
You may've opened up some new doors for me.
Much obliged!
Pat