[wd_asp elements=’search’ ratio=’100%’ id=1]

Redirect Ipad & Iphone users

13th June 2014

Php - Miscellaneous

php codehaven

// Redirect iPhone/iPod visitors
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') ||
strpos($_SERVER['HTTP_USER_AGENT'], 'iPod')){
header("Location: http://codehaven.com/iphone.php");
}

Please comment if you have used this as I haven’t had time to fully test it!