Detecting Browsers with WURFL

WURFL (Wireless Universal Resource File) is an XML file that contains the information needed to identify a wide range of mobile devices. On its own, it doesn't do anything. But if you use one of the many available libraries for it, you can create web apps that can figure out what kind of device has connected to your app.

For example, wurfl-php (http://sourceforge.net/projects/wurfl/files/WURFL%20PHP/) lets you detect which operating system a remote device is running from within a PHP script.

To use WURFL and wurfl-php, you'll need to be running your web app on a hosting provider that supports PHP. You'll also need to understand how to install files and PHP libraries onto your server. In this appendix, I show you how to do this using the Unix or Mac OS X command line. If you are uncomfortable with any of this, but are comfortable working with PHP, contact your hosting provider's support department and ask if they'd be willing to install WURFL and wurfl-php on the server you use. If you're using a shared server, it would give your hosting provider a competitive advantage to offer this feature to all their customers.

0 0

Post a comment