views:

81

answers:

1

Hi,

I've created an application with the Zend Framework. Now I was asked to make an iphone webapp for it.

So my solution is to get the useragent and render a different view for it.

My searches on google lead to Zend_UserAgent but my library says it doesn't contain it. ;) Is there any Zend way to find the useragent to render a different view or should I do it another way?

Thanks in advance!

A: 

You can use $_SERVER['HTTP_USER_AGENT'] to determine which view to show. Here's a list of all available user agents.

Skelton