Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2012
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Mobile Device Detection with WURFL

    Hi all,

    I've got a mobile site I'm trying to build, I've set up a .m subdomain for it, and I've got a javascript redirect, and a redirect within the .htaccess file. It works just fine on the iphone, not so much on android devices. I've read that WURLF is a pretty good third option, but I'm having problems getting it working.

    I've followed the instructions here: http://wurfl.sourceforge.net/dbapi_index.php, I've got my database setup correctly, but I'm a little confused as to what the next step is. Is that example php code what I need to add? Where do I add it, in the header of my index.html file?
    Last edited by mikenap; 05-25-2013 at 11:49 PM.

  • #2
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,519
    Thanks
    114
    Thanked 110 Times in 109 Posts
    I don't know if this is useful but i use http://techpatterns.com/downloads/ph..._detection.php. for mobile detection it worked well for android and iphone.

    you can use this to detect the browser from the headers. Techpatterns also have a javascript equivalent if you prefer to use that.
    You can not say you know how to do something, until you can teach it to someone else.

  • #3
    New Coder
    Join Date
    Jan 2010
    Posts
    14
    Thanks
    0
    Thanked 1 Time in 1 Post
    PHP Code:
    $user_agent "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)";
    $wurflObj->getDeviceCapabilitiesFromAgent($user_agent); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •