Olga Budnik Olga Budnik - 1 year ago 203
PHP Question

How to get user agent in PHP

I'm using this JS code to know what browser is user using for.


And I want to get this navigator.appName to php code to use it like this:

if ($appName == "Internet Explorer") {
// blabla

How can I do it?

Answer Source

Use the native PHP $_SERVER['HTTP_USER_AGENT'] variable instead.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download