# Koenig (24.02.2014 / 12:06)Сам класс Mobile Detect,
еще автодетект сделать и пару мелочей, вроде как этим вопросом Веном занялся
определение думаю
так (+/-)
/*
-----------------------------------------------------------------
Определение мобильного браузера
-----------------------------------------------------------------
*/
private function mobile_detect()
{
if (!class_exists('Mobile_Detect'))
return 0;
$detect = new Mobile_Detect;
$isMobile = $detect->isMobile();
$isTablet = $detect->isTablet();
$layout = array(0, 1, 2);
if (isset($_REQUEST['type']))
$type = intval($_REQUEST['type']);
else {
if (empty($_SESSION['is_mobile']))
$type = ($isMobile ? ($isTablet ? 1 : 0) : 2);
else
$type = $_SESSION['is_mobile'];
}
if (!in_array($type, $layout))
$type = 0;
$_SESSION['is_mobile'] = $type;
return $type;
}Это код с того мода что я писал чтоб выложить.
Koenig другого варианта на три девайса я не вижу....