PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

ZendCasts.com: Setting up Zend_HTTP_UserAgent

Note: This article was originally published at PHPDeveloper on 28 January 2011.
PHPDeveloper

In a recent post to the ZendCasts.com site, they've added a new screencast showing you how to set up Zend_HTTP_UserAgent, the component of the Zend Framework that lets you determine the software the site's visitor is using.

With the plethora of mobile devices available on the market, it's increasingly important to be able to identify the capabilities of those devices in order to present content in a an appropriate way. For instance, if the device is not capable of displaying images, you might want to omit them from the markup; alternately, if a device is capable of Flash, you may want to provide a Flash-based user interface. The process of identifying a device's capabilities typically first requires knowing the HTTP User Agent, and then comparing that user agent against a database of user agent capabilities.

The screencast lasts about 30 minutes and shows you how to set up a Zend Framework 1.1 application and integrate the WURFL data to help with determine the mobile device of the user.