PHP - if an iPhone web app #iOS #php
<?php
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"iphone")) {
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"safari")) {
echo('Running in browser on iPhone');
} else {
echo ('Running as stand alone WebApp on iPhone');
}
} else {
echo ('Running on device other than iPhone.');
}
?>