Quantcast
Channel: My Opera Forum: Opera Mini
Viewing all articles
Browse latest Browse all 2206

Getting correct headers from Opera Mini

$
0
0
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.

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?

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>