• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

iOS detection function in XenForo 1.2?

Marcus

Well-known member
#1
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;
}