How to get visitor’s browser and operating system?

User Agent string is a characteristic identification text which is submitted by web browsers, bots and other applications which use World Wide Web.

In PHP you can get this from $_SERVER['HTTP_USER_AGENT'] variable.

Using this variable you cannot identify a web browser with 100% accuracy as this string might be quite easily altered by a web browser user. Hoewever modifying UAS is not something most people do :)

 
TopOfBlogs Web Development & Design Blogs