Я пробовал некоторые решения, но я не могу получить точное имя и версию:
Я пытаюсь использовать следующий код:
$browserAgent = $_SERVER['HTTP_USER_AGENT'];
echo $browserAgent;
Вывод кода выше:
Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
Но я использую:
Google Chrome 11.0.696.68
on
Ubuntu 10.04
Таким образом, я могу найти в строке Chrome/11.0.696.68
в выходной строке, но он также показывает некоторые другие имена браузеров, которые запутывают извлечение точного браузера имя/версия из строки.