WURFL - PHP API (v1.0 2009-03-09) - How To Use "is_wireless_device"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    WURFL - PHP API (v1.0 2009-03-09) - How To Use "is_wireless_device"

    Hi!

    I remember to post this question here because I know Gum is using WURFL, but if anyone can help...

    I've just set up WURFL using the PHP API, however it seems that I cannot find a proper documentation on how to check if UA is a mobile phone or not...

    I heard about 'is_wireless_device', but I'm still stuck on it...

    I'm using it like this:
    PHP Code:
    $device $wurflManager->getDeviceForUserAgent($_SERVER['HTTP_USER_AGENT']);        
    echo 
    $device->getCapability('is_wireless_device'); 
    But the damn thing always return true, even in Opera desktop version!!
    What can be wrong? I have the latest wurfl.xml

    Or is there any other WURFL function to properly detect if it's a mobile phone or not?

    EDIT: I've just test it with firefox, it return FALSE correctly. But what's up with Opera desktop version that return true??


    Thanks in advance.
    Last edited by IceBurn; 24.06.09, 11:45.

    #2
    Nevermind, I got it working by using PHP Tools version 2.1 Final

    Comment


      #3
      Originally posted by IceBurn View Post
      Nevermind, I got it working by using PHP Tools version 2.1 Final
      if you just want to detect the pc or mpbile and redirect them to different locations you can use the code from: http://detectmobilebrowsers.mobi/

      PS.
      i had some problems with php tools for wurfl at some high traffic sites, so im using there the tera wurfl http://www.tera-wurfl.com/
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #4
        Ok, thank you for the tip about detectmobilebrowsers.mobi

        Yes, for now I just need to detect mobile phones so I'm going to check that link and put wurfl as plan B.

        Comment


          #5
          I've just found an Apache mod for WURLF, I'll probably install it instead.
          Apache Mobile Filter 2.0

          Comment


            #6
            Hi Ice,
            I am the owner of Apache Mobile Filter, let me know your opinion.

            Thanks
            Idel

            Comment


              #7
              Nice job ifuschini!

              It used to be an old wurlf apache mod, but it was outdated so yesterday I found yours.
              I haven't install it yet on my production server, but I will let you know when (and if) I install it.

              My main concern is about performance... have you made an option to make it available by htaccess? Like, have it off as default and if I want to turn it on on a specific domain, I can just make an instruction in htaccess?

              That would be a must. I'm using mod GEO IP and that's how I do, only activate it in the htaccess for the domains where I need it.


              In the meantime I've also found this simple PHP class written by Victor Stanciu, that's able to detect mobile phones, much like the function at detectmobilebrowsers.mobi, but more simple and consequently more fast. Check it out: php-mobile-detect - Google Code

              Comment


                #8
                I'm sorry IceBurn,
                but I haven't made this option, but could be a good idea for new feature.

                Idel

                Comment


                  #9
                  Hi IceBurn,
                  this night I study your problem, I think is possible configure the Apache Mobile Filter with .htaccess.
                  Look this URL: mod_perl: mod_perl 2.0 Server Configuration

                  Comment

                  Working...
                  X