Detecting iPads/iPhones using PHP
Tags: detection, iPad, iPhone, php
Date: 11th June, 2010
Lovely little script:
if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) {
// iPhone video or whatever it is you want to show differently
} else {
// content for everyone else
}
?>