Welcome to WebmasterWorld Guest from 54.197.171.28

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to get the browser info in PHP

Using HTTP_USER_AGENT

   
5:29 pm on Jul 12, 2001 (gmt 0)

10+ Year Member



Just a quick question.
I was wondering how I can get the operating sytem with $HTTP_USER_AGENT?
I saw in a different post that to get the borwser you do $HTTP_USER_AGENT (browser).
So would it be $HTTP_USER_AGENT (os) or something similar for the OS?
Thanks
6:31 pm on Jul 12, 2001 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Often, but not always, the OS is identified by the browser's U_A. Here are some examples:
Mozilla/4.7 [en] (WinNT; U)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Mozilla/4.51 [en]C-CCK-MCD (Win95; I)
Mozilla/4.76 [en] (X11; U; Linux 2.2.17-21mdk i686)

You'll have to extract that info from it.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month