Tag: iphone visitor

Detecting iPhone visitors with PHP

More and more internet traffic is generated by the iPhone and iPod touch.

The PHP snippet below shows you how to automatically redirect your users to a page which is optimized for the iPhone Safari browser.

Select Code
if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod'))
// Change your URL below
header('Location: http://www.domain.com/iphone');