Long time ago I developed Browser Detection Class which is able to recognize most of popular browser/OS’s used today.
For example FF on my macbook pro would be recognized like this:
Mozilla Firefox 3.0.4 / Mac OS X
Very useful stuff in case you have to redirect your users to different pages depending of browser version or to maintain your own site browser/os usage statistics.
Today I had a chance to update it with support for Windows Vista, Google Chrome and iPhone.
You can download complete code with usage examples by following this link.