User-Agent browser info

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atrisa
    New Member
    • Sep 2010
    • 22

    User-Agent browser info

    Hi everyone. I want to get list of browsers from the User-Agent strings in HTTP header. The browser info is said to be the second entry inside the parenthesis (U for Mozilla Firefox), but sometimes that is not enough and it must be related to other entries, like in the following where the browser is Google Chrome and seen second last in the string.

    Code:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
    As you see, the user-agent string is quite messy and I can't find a clear pattern in it for implementing. Any idea or suggestions how to handle this? Thanks.
Working...