iOS detection function in XenForo 1.2?

Marcus

Well-known member
Is there an updated OS detection in XenForo 1.2? Currently I use this:
PHP:
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$MacOSX = stripos($_SERVER['HTTP_USER_AGENT'],"Mac ");
$Android= stripos($_SERVER['HTTP_USER_AGENT'],"Android");

if( $iPod || $iPhone || $iPad || $MacOSX){
  $AppleUser = 1;
}
 
Back
Top Bottom