WURFL

 
 
WURFL (=Wireless Universal Resource File) is an XML configuration file which contains information about capabilities and features of almost all wireless devices in the world. Many people have contributed to this project but the core team consists of Andrea Trasatti and Luca Passani. WURFL can be used for free in any application.

More information can be found at: http://wurfl.sourceforge.net/







Installing WURFL on PHP



Information
The WURFL PHP tools can be downloaded from:
http://wurfl.sourceforge.net/php/index.php

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0 or higher.
PHP 4.3.3 or higher or PHP 5.

Procedure
  1. Create the following directories on the webserver docroot:
    <docroot>/wurfl
    <docroot>/wurfl_data


  2. Download and unzip wurfl_php_tools_21beta2.zip into <docroot>/wurfl
    The wurfl directoy should contain the following files:
    • check_wurfl.php
    • update_cache.php
    • wurfl_class.php
    • wurfl_config.php
    • wurfl_parser.php
    • readme.txt

  3. Download and unzip wurfl.zip into <docroot>/wurfl_data.
    The wurfl_data directory should contain the wurfl.xml file.

  4. Download the web_browsers_patch.xml and move it into <docroot>/wurfl_data

  5. Edit file <docroot>/wurfl/wurfl_config.php.
    • Modify the following line into:
      define("DATADIR", '../wurfl_data/');
    • Add line:
      define("WURFL_PATCH_FILE", DATADIR.'web_browsers_patch.xml');

  6. Open a browser and enter the following url:

    https://www.mobilefish.com/wurfl/update_cache.php

    You should something like see:
    Parser load time:0.00970506668091
    Parsing time:61.6522738934
    Total:-1173815022.15


  7. In <docroot>/wurfl_data, the subdirectory multicache is created containing 9728 files with a total size of approx 3.5 MB.

    multicache



  8. To check if the installation is successfull, open a browser and enter the following url:

    https://www.mobilefish.com/wurfl/check_wurfl.php

    You should something like see:

    WURFL check

    In the textbox "force ua", you can enter the user agent, for example SonyEricssonF500i, and it will find all information about this device.
    See wurfl.xml: <device user_agent="SonyEricssonF500i" ...>