if ($browser->isMobile()) {
$this->addClass('mobile');
$this->addClass('phone');
$this->addClass('touchevents');
$this->device = 'phone';
} else if ($browser->isTablet()) {
$this->addClass('mobile');
$this->addClass('tablet');
$this->addClass('touchevents');
$this->device = 'tablet';
} else {
$this->addClass('desktop');
$this->device = 'desktop';
}
switch ($browser->getPlatform()) {
case Browser::PLATFORM_ANDROID:
$this->addClass('android');
break;
case Browser::PLATFORM_APPLE:
$this->addClass('mac');
if ($browser->getBrowser() === Browser::BROWSER_SAFARI) {
$this->addClass('apple');
}
break;
case Browser::PLATFORM_IPAD:
$this->addClass('ipad');
$this->addClass('ios');
$this->addClass('apple');
break;
case Browser::PLATFORM_IPHONE:
$this->addClass('iphone');
$this->addClass('ios');
$this->addClass('apple');
break;
case Browser::PLATFORM_LINUX:
$this->addClass('linux');
break;
case Browser::PLATFORM_WINDOWS:
$this->addClass('win');
break;
}
// browser detect
$version = explode('.', $browser->getVersion());
$version = is_array($version) && count($version) ? $version[0] : '';
switch ($browser->getBrowser()) {
case Browser::BROWSER_CHROME:
$this->addClass('chrome');
$this->addClass('chrome' . $version);
$this->addClass('webkit');
break;
case Browser::BROWSER_FIREFOX:
$this->addClass('firefox');
$this->addClass('firefox' . $version);
break;
case Browser::BROWSER_EDGE;
$this->addClass('edge');
$this->addClass('ie');
$this->addClass('ie' . $version);
break;
case Browser::BROWSER_IE:
$this->addClass('ie');
$this->addClass('ie' . $version);
break;
case Browser::BROWSER_OPERA:
$this->addClass('opera');
$this->addClass('opera' . $version);
$this->addClass('webkit');
break;
case Browser::BROWSER_SAFARI:
case Browser::BROWSER_IPHONE:
case Browser::BROWSER_IPAD:
$this->addClass('safari');
$this->addClass('safari' . $version);
$this->addClass('webkit');
break;
default:
$this->addClass(strtolower(str_replace(' ', '', $browser->getBrowser())));
}
protected function checkBrowserSafari()
{
if (stripos($this->_agent, 'Safari') !== false
&& stripos($this->_agent, 'iPhone') === false
&& stripos($this->_agent, 'iPod') === false
) {
$aresult = explode('/', stristr($this->_agent, 'Version'));
if (isset($aresult[1])) {
$aversion = explode(' ', $aresult[1]);
$this->setVersion($aversion[0]);
} else {
$this->setVersion(self::VERSION_UNKNOWN);
}
$this->setBrowser(self::BROWSER_SAFARI);
return true;
}
return false;
}
protected function checkBrowseriPhone()
{
if (stripos($this->_agent, 'iPhone') !== false) {
$this->setVersion(self::VERSION_UNKNOWN);
$this->setBrowser(self::BROWSER_IPHONE);
$this->getSafariVersionOnIos();
$this->getChromeVersionOnIos();
$this->checkForFacebookIos();
$this->setMobile(true);
return true;
}
return false;
}
/**
* Determine if the browser is iPad or not (last updated 1.7)
* @return boolean True if the browser is iPad otherwise false
*/
protected function checkBrowseriPad()
{
if (stripos($this->_agent, 'iPad') !== false) {
$this->setVersion(self::VERSION_UNKNOWN);
$this->setBrowser(self::BROWSER_IPAD);
$this->getSafariVersionOnIos();
$this->getChromeVersionOnIos();
$this->checkForFacebookIos();
$this->setTablet(true);
return true;
}
return false;
}
/**
* Determine if the browser is iPod or not (last updated 1.7)
* @return boolean True if the browser is iPod otherwise false
*/
protected function checkBrowseriPod()
{
if (stripos($this->_agent, 'iPod') !== false) {
$this->setVersion(self::VERSION_UNKNOWN);
$this->setBrowser(self::BROWSER_IPOD);
$this->getSafariVersionOnIos();
$this->getChromeVersionOnIos();
$this->checkForFacebookIos();
$this->setMobile(true);
return true;
}
return false;
}
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
# Hint: The current UA entries in Opencart should be redefined in cache plugin for Opencart.
RewriteCond %{HTTP_USER_AGENT} "BlackBerry|Palm|Mobile|mobi|Windows Mobile|Android|Opera Mini|Silk" [NC]
RewriteCond %{HTTP_USER_AGENT} "!Macintosh|Mac OS X|iPhone|iPad|FxiOS" [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobile]
RewriteCond %{HTTP_USER_AGENT} "Mac OS X|iPhone|iPad" [NC]
RewriteCond %{HTTP_USER_AGENT} "Mobile" [NC]
RewriteCond %{HTTP_USER_AGENT} "!Firefox|FxiOS|Opera|BlackBerry|Palm|Trident|Android" [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobileSafari]
RewriteCond %{HTTP_USER_AGENT} "Mac OS X|Macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "!Mobile|iPhone|iPad|Opera|FxiOS|BlackBerry|Palm" [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktopSafari]
Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
RewriteCond %{HTTP_USER_AGENT} "Mac OS X|Macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "!Mobile|iPhone|iPad|Opera|FxiOS|BlackBerry|Palm" [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktopSafari]
RewriteCond %{HTTP_USER_AGENT} "Mac OS X|Macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "Chrome" [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktopRetina]
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Safari/537.36 Chrome-Lighthouse
RewriteCond %{HTTP_USER_AGENT} "iPad" [NC] RewriteRule .* - [E=Cache-Control:vary=isiPadSafari]
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod" [NC] RewriteRule .* - [E=Cache-Control:vary=isMobileSafari]
RewriteCond %{HTTP_USER_AGENT} "BlackBerry|Palm|Mobile|mobi|Windows Mobile|Android|Opera Mini|Silk" [NC]
RewriteCond %{HTTP_USER_AGENT} "!iPhone|iPad|iPod" [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobile]
RewriteCond %{HTTP_USER_AGENT} "iPad" [NC] RewriteRule .* - [E=Cache-Control:vary=isiPadSafari]
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod" [NC] RewriteRule .* - [E=Cache-Control:vary=isMobileSafari]
RewriteCond %{HTTP_USER_AGENT} "BlackBerry|Palm|Mobile|mobi|Windows Mobile|Android|Opera Mini|Silk" [NC]
RewriteCond %{HTTP_USER_AGENT} "!iPhone|iPad|iPod" [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobile]
|------------------------------------------------------------------------------------------|
| WinMTR statistics |
| Host - % | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|cs-central-router.computersystemsltd.com - 0 | 445 | 445 | 0 | 0 | 3 | 0 |
| cs-trifle.computersystemsltd.com - 0 | 445 | 445 | 0 | 0 | 12 | 0 |
| unknown.dne.volia.net - 0 | 445 | 445 | 0 | 0 | 11 | 0 |
| unknown.dne.volia.net - 0 | 445 | 445 | 1 | 3 | 152 | 1 |
| te0-2-0-9.833.cr-1.g50.kiev.volia.net - 0 | 445 | 445 | 8 | 8 | 63 | 9 |
| be3.180.cr-2.g50.kiev.volia.net - 0 | 445 | 445 | 7 | 8 | 52 | 8 |
| 37-249-179-213.ip.ukrtel.net - 0 | 445 | 445 | 7 | 18 | 140 | 7 |
| No response from host - 100 | 90 | 0 | 0 | 0 | 0 | 0 |
| 126-129-132-95.pool.ukrtel.net - 0 | 445 | 445 | 8 | 10 | 66 | 8 |
| sw90.default-host.net - 0 | 445 | 445 | 10 | 26 | 120 | 27 |
| web379.default-host.net - 0 | 445 | 445 | 8 | 8 | 15 | 8 |
|________________________________________________|______|______|______|______|______|______|
WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider