http://www.i-do-this.com/blog/14/Make-y ... bile-ready
Unfortunately, I'm not having much success. I can see the PHP in the example function is using the HTTP_USER_AGENT value to determine what mobile device is being used.
Code: Select all
...
$user_agent = $_SERVER['HTTP_USER_AGENT'];
...
case (eregi('android',$user_agent));
$mobile_browser = $android;
...
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0
I don't see "android" anywhere in that string... this leads me to believe using HTTP_USER_AGENT is a poor way to determine if my site is being displayed on Android.
Is there a better or more correct (and dependable) way to determine if your site is being displayed on a mobile device?
I'm using CMSMS 1.10.2.