I have tried some solutions but I am unable to get exact name and version:
I am trying following code:
$browserAgent = $_SERVER['HTTP_USER_AGENT'];
echo $browserAgent;
Output of above code:
Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
But I am using:
Google Chrome 11.0.696.68
on
Ubuntu 10.04
So I can find in Chrome/11.0.696.68
in output string but it is also showing some other browsers names that is confusing to extract exact browser name/version from string.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…