Hi Im tracking the browsers of the users who are visiting my site with the use of browsecap.ini
the following is the code that i use
if(isset($message['HTTP_USER_AGENT'])){
$get_browser = get_browser($message['HTTP_USER_AGENT'], true);
if (!empty($get_browser)){
$str_values.='".mysql_real_escape_string($get_browser['comment'])."'
But when the users who use the opera browser in a galaxy tab are shown as chrome browser users
can anybody help me to rectify this isse
P.S - Im using the lite version of browsecap.ini file
You kindly provided me with a sample UA string of the offending mobile Opera browser:
and the regex returned by
get_browser()on that UA is:which didn't detect the Opera browser at all. However, I found this function that you can also run to get the browser name. The very first check is for that "OPR/" fragment of the UA string.
When run with the test UA supplied above, the output is "Opera".
Ref: How to get exact browser name and version?