Installation

First, download wurfl-php and unzip it somewhere on your server (in general, it's best to not put libraries in your public web folder, so I'm putting it into the src directory in my home directory). Replace ~/src with the location you want to install it to and replace wurfl-php-1.1.tar.gz with the name of the file you actually downloaded:

$ tar xvfz ~/Downloads/wurfl-php-1.1.tar.gz

Next, download the latest WURFL file (http://sourceforge.net/projects/wurfl/files/ WURFL/), copy it into the wurfl-php folder, and gunzip it (see the wurfl-php documentation for tips on using this file in its compressed state). Replace ~/src/wurfl-php-1.1/ with the full path to the directory that was created in the previous step when you extracted the wurfl-php distribution, and replace ~/Downloads/wurfl-latest.xml.gz with the path to the WURFL distribution that you downloaded:

$ cd ~/src/wurfl-php-1.l/ $ cp ~/Downloads/wurfl-latest.xml.gz . $ gunzip wurfl-latest.xml.gz

Finally, download the desktop web browser patch so WURFL doesn't encounter errors when someone visits your page from a desktop browser:

$ curl -O http://wurfl.sourceforge.net/web_browsers_patch.xml

0 0

Post a comment