public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Sagem', 'SAGEM')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Nokia') && !WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Android', 'iPhone')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla/5') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('iPhone', 'iPod', 'iPad')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Opera Mobi', 'Opera Tablet')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Samsung', 'SAMSUNG')) || WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('SEC-', 'SPH', 'SGH', 'SCH')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithCaseInsensitive($userAgent, "alcatel"); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Qtek'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsCaseInsensitive($userAgent, 'blackberry') || WURFL_Handlers_Utils::checkIfContains($userAgent, '(BB10;') || WURFL_Handlers_Utils::checkIfContains($userAgent, '(PlayBook'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContains($userAgent, 'Android') && WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Fennec', 'Firefox')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('HTC', 'XV6875')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('kyocera', 'QC-', 'KWC-')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Sanyo', 'SANYO')) || WURFL_Handlers_Utils::checkIfContains($userAgent, 'MobilePhone'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "Alcatel") || WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "ALCATEL"); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Mot-', 'MOT-', 'MOTO', 'moto')) || WURFL_Handlers_Utils::checkIfContains($userAgent, 'Motorola'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'NativeHost')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsCaseInsensitive($userAgent, "BlackBerry"); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "Philips") || WURFL_Handlers_Utils::checkIfStartsWith($userAgent, "PHILIPS"); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla') && WURFL_Handlers_Utils::checkIfContains($userAgent, 'UCBrowser'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array("LGUPLUS", "lgtelecom")); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Grundig', 'GRUNDIG')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfStartsWithAnyOf($userAgent, array('Pantech', 'PT-', 'PANTECH', 'PG-')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Android', 'Opera Mini')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('iPhone', 'iPod', 'iPad')) && !WURFL_Handlers_Utils::checkIfContains($userAgent, 'Symbian'); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Nintendo')) { return true; } return WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Mozilla/') && WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Nitro', 'Opera')); }
public function canHandle($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return false; } // Capturing WP desktop mode UAs but not Windows RT UAs if (WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('WPDesktop', 'ZuneWP7')) || WURFL_Handlers_Utils::checkIfContainsAll($userAgent, array('Mozilla/5.0 (Windows NT ', ' ARM;', ' Edge/'))) { return true; } return WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Windows Phone', 'WindowsPhone', 'NativeHost')); }
/** * Applies Catch-All match * @param string $userAgent * @return string WURFL deviceID */ public function applyRecoveryCatchAllMatch($userAgent) { if (WURFL_Handlers_Utils::isDesktopBrowserHeavyDutyAnalysis($userAgent)) { return WURFL_Constants::GENERIC_WEB_BROWSER; } $mobile = WURFL_Handlers_Utils::isMobileBrowser($userAgent); $desktop = WURFL_Handlers_Utils::isDesktopBrowser($userAgent); if (!$desktop) { $deviceId = WURFL_Handlers_Utils::getMobileCatchAllId($userAgent); if ($deviceId !== WURFL_Constants::NO_MATCH) { return $deviceId; } } if ($mobile) { return WURFL_Constants::GENERIC_MOBILE; } if ($desktop) { return WURFL_Constants::GENERIC_WEB_BROWSER; } return WURFL_Constants::GENERIC; }
/** * Is the given user agent very likely to be a desktop browser * @param string $userAgent * @return bool */ public static function isDesktopBrowserHeavyDutyAnalysis($userAgent) { // Check Smart TV keywords if (WURFL_Handlers_Utils::isSmartTV($userAgent)) { return false; } // Chrome if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Chrome') && !WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Android', 'Ventana'))) { return true; } // Check mobile keywords if (WURFL_Handlers_Utils::isMobileBrowser($userAgent)) { return false; } if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'PPC')) { return false; } // PowerPC; not always mobile, but we'll kick it out // Firefox; fennec is already handled in the WURFL_Constants::$MOBILE_BROWSERS keywords if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Firefox') && !WURFL_Handlers_Utils::checkIfContains($userAgent, 'Tablet')) { return true; } // Safari if (preg_match('#^Mozilla/5\\.0 \\((?:Macintosh|Windows)[^\\)]+\\) AppleWebKit/[\\d\\.]+ \\(KHTML, like Gecko\\) Version/[\\d\\.]+ Safari/[\\d\\.]+$#', $userAgent)) { return true; } // Opera Desktop if (WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Opera/9.80 (Windows NT', 'Opera/9.80 (Macintosh')) { return true; } // Check desktop keywords if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) { return true; } // Internet Explorer 11 if (preg_match('/^Mozilla\\/5\\.0 \\(Windows NT.+?Trident.+?; rv:\\d\\d\\.\\d+\\)/', $userAgent)) { return true; } // Internet Explorer 9 or 10 if (preg_match('/^Mozilla\\/5\\.0 \\(compatible; MSIE (9|10)\\.0; Windows NT \\d\\.\\d/', $userAgent)) { return true; } // Internet Explorer <9 if (preg_match('/^Mozilla\\/4\\.0 \\(compatible; MSIE \\d\\.\\d; Windows NT \\d\\.\\d/', $userAgent)) { return true; } return false; }