I have a list of user agents which visited my website. And I would like to turn them into user statics such as which browser and os are reaching the most to my website. For Example: I have one user agent who visited my site like that.

Mozilla/5.0 (iPhonel Ul; CPU iPhone OS 5_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B176 Safari/7534.48.3

And I would like to turn it into like this.

Device = iPhone 4 OS = iOS 5.1 Browser= Google Chrome Mobile

Is there any tools or any software available for turning User Agents into useful information like that? I found some tools but they are not complete(means they cannot detect some user agents) and they do not have some device information. Thanks in advance.


Since most browsers do not usually supply good or in face true information about them, we cannot solely rely on the header information they by themselves supply to us. The WhichBrowser tool can detect many if not most of the browsers and operating systems depending on not just the Browser given headers but also some of he behaviors that browsers usually show. It is open source so you can delve into it or just use the library as is.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.