How to get user agent in php

How to get user agent in php.

It is easy to get vistors information(user agent or browser information) in php.

Below code is most helpfull to track vistors information(user agent or browser information) in php

Happy coding..