Hi,
I tried to detect the browser on Nokia E5-00 using opera mini but I get Nokia BrowserNG as the browser.
Can anyone help? Below is my code -
require_once('wurfl/TeraWurfl.php');
$wurfl = new TeraWurfl();
$matched = $wurfl->getDeviceCapabilitiesFromAgent();
$browser = $wurfl->getDeviceCapability("mobile_browser");
echo $browser . "<br>";
I also tried passing $_SERVER['HTTP_USER_AGENT'] to getDeviceCapabilitiesFromAgent(), but no luck.
Regards,
DJ
Opera mini detection failure
-
- Posts: 6
- Joined: Mon May 27, 2013 8:25 am
Re: Opera mini detection failure
Also when I tested it from a Samsung device it gave me Openwave mobile browser, where I did a check in the headers and my script returned opera correctly. Below is the small script I used -
$ua = $_SERVER['HTTP_USER_AGENT'];
//echo $ua . "<br>";
if (eregi('opera mini', $ua))
{
echo "Opera";
}
Regards,
DJ
$ua = $_SERVER['HTTP_USER_AGENT'];
//echo $ua . "<br>";
if (eregi('opera mini', $ua))
{
echo "Opera";
}
Regards,
DJ
Re: Opera mini detection failure
Hi DJ,
You've highlighted an area that is regularly debated: if the API must decide between detecting the device or detecting the browser, but not both, what should it choose? Currently, the Database API will err on the side of the device for OperaMini requests, since OperaMini does not send much helpful information in its user agent string. Inside the HTTP request, the OperaMini user agent and the original user are available and there is some logic in the API that decides which one to use. This having been said, passing the raw HTTP_USER_AGENT should do the trick and provide you with an "Opera Mini" response. Can you post the Opera Mini user agent that you are testing?
You've highlighted an area that is regularly debated: if the API must decide between detecting the device or detecting the browser, but not both, what should it choose? Currently, the Database API will err on the side of the device for OperaMini requests, since OperaMini does not send much helpful information in its user agent string. Inside the HTTP request, the OperaMini user agent and the original user are available and there is some logic in the API that decides which one to use. This having been said, passing the raw HTTP_USER_AGENT should do the trick and provide you with an "Opera Mini" response. Can you post the Opera Mini user agent that you are testing?
Thanks,
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
-
- Posts: 6
- Joined: Mon May 27, 2013 8:25 am
Re: Opera mini detection failure
Hi Steve,
Pls find below the HTTP_USER_AGENT data -
Mozilla/5.0 (Symbian OS/9.3; Series60/3.2 NokiaE5-00/101.003; Profile/MIDP/2.1 Configuration/CLDC-1.1 ) AppleWebkit/525 (KHTML, like Gecko Version/3.0)
This is on a Nokia phone via Opera mini browser.
Rgds,
DJ
Pls find below the HTTP_USER_AGENT data -
Mozilla/5.0 (Symbian OS/9.3; Series60/3.2 NokiaE5-00/101.003; Profile/MIDP/2.1 Configuration/CLDC-1.1 ) AppleWebkit/525 (KHTML, like Gecko Version/3.0)
This is on a Nokia phone via Opera mini browser.
Rgds,
DJ
Re: Opera mini detection failure
This particular user agent string is not being matched because it is invalid.
In the UA you've pasted (above), there is a space between "Symbian" and "OS", which is not present in real requests. If this space is removed the device is detected properly. I can dig a little deeper, but in the most recent 10,000,000 requests that I have seen, I see no instances of "Mozilla/5.0 (Symbian OS", and 415,417 instances of "Mozilla/5.0 (SymbianOS".
Code: Select all
Mozilla/5.0 (Symbian OS/9.3; Series60/3.2 NokiaE5-00/101.003; Profile/MIDP/2.1 Configuration/CLDC-1.1 ) AppleWebkit/525 (KHTML, like Gecko Version/3.0)
Thanks,
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Who is online
Users browsing this forum: No registered users and 4 guests