This is a short hack on how to figure out what OS you site is being accessed from. This is useful if you want to redirect to different versions of your site through php.
1 2 3 4 5 6 7 8 9 | <?php
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
$webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
?>
|
For more cool codes checkout my blog Captain DeadBones Chronicles