Last post by iameros:
For all of our mobile sites we log all incoming requests to our pages via a PHP script. We get thousands of hits each day from Opera mini and we have been using the code snippet below to determine the correct user agent.
However, after running this for some time I find that in the vast majority of cases the X-OperaMini-Phone header is blank. Does the code above look correct? And if so, can you shed some light on why?
if (array_key_exists("X-OperaMini-Phone", $headers)) { $ua= mysql_real_escape_string('Opera-').($headers["X-OperaMini-Phone"]); } else { $ua = mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']); }
However, after running this for some time I find that in the vast majority of cases the X-OperaMini-Phone header is blank. Does the code above look correct? And if so, can you shed some light on why?