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 ...

Get Head First Mobile Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.