$value){ //echo $value; if(stristr($_SERVER["HTTP_USER_AGENT"],$value)){ $mobile_platform = $value; $mobile = 1; break; }else{ $mobile_platform = 0; $mobile = 0; } } ///get platform os if(stristr($_SERVER["HTTP_USER_AGENT"],"Windows")){ $platform = "Windows"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Linux")){ $platform = "Linux"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Mac")){ $platform = "Mac"; } ///get browser if(stristr($_SERVER["HTTP_USER_AGENT"],"Safari")){ $browser = "Safari"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Firefox")){ $browser = "Firefox"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Explorer")){ $browser = "Internet Explorer"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Chrome")){ $browser = "Google Chrome"; } if(stristr($_SERVER["HTTP_USER_AGENT"],"Opera")){ $browser = "Opera"; } $user_profile = array(0 => $mobile, "mobile" => $mobile, 1 => $platform, "platform" => $platform, 2 => $mobile_platform, "mobile_platform" => $mobile_platform, 3 => $browser, "browser" => $browser); return $user_profile; } } ?>