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
- Create the following directories on the webserver docroot:
<docroot>/wurfl
<docroot>/wurfl_data
- 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
- Download and unzip wurfl.zip into <docroot>/wurfl_data.
The wurfl_data directory should contain the wurfl.xml file.
- Download the web_browsers_patch.xml and move it into <docroot>/wurfl_data
- 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');
- 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
- In <docroot>/wurfl_data, the subdirectory multicache is created
containing 9728 files with a total size of approx 3.5 MB.
- 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:
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" ...>
|