We've create a iOS app for our web-site and we want to redirect all iOS visitors to iTunes store. Our web-site use Zend framework with configured and worked wurfl.
Now, we trying redirect via browser name
$bootstrap = $this->getInvokeArg('bootstrap');
$view = $bootstrap->getResource('useragent')->getDevice()->getBrowser();
if($view == 'Chrome') {
$this->view->mobile = true;
}
CTO @ScientiaMobile and WURFL creator here. I advise you check out http://wurfljs.com/
In a nutshell, if you import a tiny JS file:
<script type='text/javascript' src="http://wurfljs.com/wurfl.js"></script>
you will be left with a JSON object that looks like:
{
"complete_device_name":"Google Nexus 7",
"is_mobile":true,
"form_factor":"Tablet"
}
(that's assuming you are using a Nexus 7, of course) and you will be able to do things like:
if(WURFL.is_mobile){
//dostuff();
}
As an important aside, we go out of our way to recognize iPhone actual models by exploiting javascript (this allows us to exploit info that is not available through sheer analysis of the HTTP headers)
Please note that I work for the company that offers this free service. Thanks.