09-30-2009 04:25 AM
I am building a website optimized for mobile devices. When i hit the url of the site i perform a check on the User Agent
( like Blackberry9000/18.104.22.168 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/247 )
to detect if the browser is the Blackberry browser of the device and accordingly redirect it to the mobile version of the site.
However, if i hit the url using the IE & Firefox browsers by setting the Browser Configuration to IE / Firefox on Blackberry Device the user agent returned is that of the Browsers(IE & Firefox) wherein i cannot by any means identify whether the browser is the Blackberry device browser or a normal PC IE/Firefox browser and as a result redirection takes the user to the PC version of the site.
My urgent requirement is to detect all url hits from Blackberry device no matter what the browser used i.e. to make sure that the browser hitting the url is from a blackberry device.
Please post any solutions or methods that i could use.
10-02-2009 05:26 PM
you'll see that the blackberry also introducesa $_SERVER['profile'] variable which is a URL to a XML file that gives you all the details about the blackberry device the user is using. Including the screen size and resolutions. So I'd use that instead.
Just do a
and you'll see waht I mean.