It's really easy to detect mobile Safari with PHP:
$isMobileSafari = preg_match('/(iPod|iPhone|iPad)/', $_SERVER['HTTP_USER_AGENT']);
The variable is TRUE is it's mobile Safari on an iPod, iPhone or iPad, FALSE otherwise.
May 11, 2012
From the archive. I've left this one just as I wrote it.
It's really easy to detect mobile Safari with PHP:
$isMobileSafari = preg_match('/(iPod|iPhone|iPad)/', $_SERVER['HTTP_USER_AGENT']);
The variable is TRUE is it's mobile Safari on an iPod, iPhone or iPad, FALSE otherwise.