O'Reilly logo

Head First Mobile Web by Lyza Danger Gardner, Jason Grigsby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. Install WURFL: Sniffing out devices

image with no caption

The first step to solving device detection mysteries is a bit of legwork. Any decent gumshoe knows we’ve got to gather our clues and interrogate our witnesses. First, we need to seek out the brains of the operation: the WURFL PHP API. Then we’ll go track down the brawn: capability information for thousands of devices in a single XML data file. But it’ll take a bit of coaxing to get the two to spill the whole story, so we’ll tweak a bit of configuration and take some careful notes.

Who’s got the brains?

We’ve got to track down the WURFL API and its data. Here’s the plan.

Download and install the brains of WURFL: the PHP API.

Download and install the brawn: the WURFL XML device data.

Make some minor configuration adjustments and take note of some things.

WURFL (Wireless Universal Resource FiLe) is an XML data file full of vast amounts of capability and feature support data for mobile devices and their browsers. There is also an API for interacting with the data file. We’ll need that, too!

Note

Say it with us: “WURRRR-full.”

Download the API

Go to WURFL ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required