Lines Matching refs:this

151         $this->reset();
153 $this->setUserAgent($userAgent);
155 $this->determine();
164 $this->_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
165 $this->_browser_name = self::BROWSER_UNKNOWN;
166 $this->_version = self::VERSION_UNKNOWN;
167 $this->_platform = self::PLATFORM_UNKNOWN;
168 $this->_os = self::OPERATING_SYSTEM_UNKNOWN;
169 $this->_is_aol = false;
170 $this->_is_mobile = false;
171 $this->_is_tablet = false;
172 $this->_is_robot = false;
173 $this->_is_facebook = false;
174 $this->_aol_version = self::VERSION_UNKNOWN;
184 return (0 == strcasecmp($this->_browser_name, trim($browserName)));
193 return $this->_browser_name;
202 $this->_browser_name = $browser;
211 return $this->_platform;
220 $this->_platform = $platform;
229 return $this->_version;
238 $this->_version = preg_replace('/[^0-9,.,a-z,A-Z-]/', '', $version);
247 return $this->_aol_version;
256 $this->_aol_version = preg_replace('/[^0-9,.,a-z,A-Z]/', '', $version);
265 return $this->_is_aol;
274 return $this->_is_mobile;
283 return $this->_is_tablet;
292 return $this->_is_robot;
301 return $this->_is_facebook;
310 $this->_is_aol = $isAol;
319 $this->_is_mobile = $value;
328 $this->_is_tablet = $value;
337 $this->_is_robot = $value;
346 $this->_is_facebook = $value;
355 return $this->_agent;
364 $this->reset();
365 $this->_agent = $agent_string;
366 $this->determine();
376 return (strpos($this->_agent, "chromeframe") !== false);
385 return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" .
386 "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" .
387 "<strong>Browser User Agent String:</strong> {$this->getUserAgent()}<br/>\n" .
388 "<strong>Platform:</strong> {$this->getPlatform()}<br/>";
396 $this->checkPlatform();
397 $this->checkBrowsers();
398 $this->checkForAol();
422 $this->checkBrowserWebTv() ||
423 $this->checkBrowserEdge() ||
424 $this->checkBrowserInternetExplorer() ||
425 $this->checkBrowserOpera() ||
426 $this->checkBrowserGaleon() ||
427 $this->checkBrowserNetscapeNavigator9Plus() ||
428 $this->checkBrowserVivaldi() ||
429 $this->checkBrowserYandex() ||
430 $this->checkBrowserFirefox() ||
431 $this->checkBrowserChrome() ||
432 $this->checkBrowserOmniWeb() ||
435 $this->checkBrowserAndroid() ||
436 $this->checkBrowseriPad() ||
437 $this->checkBrowseriPod() ||
438 $this->checkBrowseriPhone() ||
439 $this->checkBrowserBlackBerry() ||
440 $this->checkBrowserNokia() ||
443 $this->checkBrowserGoogleBot() ||
444 $this->checkBrowserMSNBot() ||
445 $this->checkBrowserBingBot() ||
446 $this->checkBrowserSlurp() ||
449 $this->checkBrowserYandexBot() ||
450 $this->checkBrowserYandexImageResizerBot() ||
451 $this->checkBrowserYandexBlogsBot() ||
452 $this->checkBrowserYandexCatalogBot() ||
453 $this->checkBrowserYandexDirectBot() ||
454 $this->checkBrowserYandexFaviconsBot() ||
455 $this->checkBrowserYandexImagesBot() ||
456 $this->checkBrowserYandexMediaBot() ||
457 $this->checkBrowserYandexMetrikaBot() ||
458 $this->checkBrowserYandexNewsBot() ||
459 $this->checkBrowserYandexVideoBot() ||
460 $this->checkBrowserYandexWebmasterBot() ||
463 $this->checkFacebookExternalHit() ||
466 $this->checkBrowserSamsung() ||
467 $this->checkBrowserSilk() ||
468 $this->checkBrowserSafari() ||
471 $this->checkBrowserNetPositive() ||
472 $this->checkBrowserFirebird() ||
473 $this->checkBrowserKonqueror() ||
474 $this->checkBrowserIcab() ||
475 $this->checkBrowserPhoenix() ||
476 $this->checkBrowserAmaya() ||
477 $this->checkBrowserLynx() ||
478 $this->checkBrowserShiretoko() ||
479 $this->checkBrowserIceCat() ||
480 $this->checkBrowserIceweasel() ||
481 $this->checkBrowserW3CValidator() ||
482 $this->checkBrowserPlayStation() ||
483 $this->checkBrowserIframely() ||
484 $this->checkBrowserCocoa() ||
485 … $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
497 if (stripos($this->_agent, 'blackberry') !== false) {
498 $aresult = explode("/", stristr($this->_agent, "BlackBerry"));
501 $this->setVersion($aversion[0]);
502 $this->_browser_name = self::BROWSER_BLACKBERRY;
503 $this->setMobile(true);
516 $this->setAol(false);
517 $this->setAolVersion(self::VERSION_UNKNOWN);
519 if (stripos($this->_agent, 'aol') !== false) {
520 $aversion = explode(' ', stristr($this->_agent, 'AOL'));
522 $this->setAol(true);
523 $this->setAolVersion(preg_replace('/[^0-9\.a-z]/i', '', $aversion[1]));
536 if (stripos($this->_agent, 'googlebot') !== false) {
537 $aresult = explode('/', stristr($this->_agent, 'googlebot'));
540 $this->setVersion(str_replace(';', '', $aversion[0]));
541 $this->_browser_name = self::BROWSER_GOOGLEBOT;
542 $this->setRobot(true);
555 if (stripos($this->_agent, 'YandexBot') !== false) {
556 $aresult = explode('/', stristr($this->_agent, 'YandexBot'));
559 $this->setVersion(str_replace(';', '', $aversion[0]));
560 $this->_browser_name = self::BROWSER_YANDEXBOT;
561 $this->setRobot(true);
574 if (stripos($this->_agent, 'YandexImageResizer') !== false) {
575 $aresult = explode('/', stristr($this->_agent, 'YandexImageResizer'));
578 $this->setVersion(str_replace(';', '', $aversion[0]));
579 $this->_browser_name = self::BROWSER_YANDEXIMAGERESIZER_BOT;
580 $this->setRobot(true);
593 if (stripos($this->_agent, 'YandexCatalog') !== false) {
594 $aresult = explode('/', stristr($this->_agent, 'YandexCatalog'));
597 $this->setVersion(str_replace(';', '', $aversion[0]));
598 $this->_browser_name = self::BROWSER_YANDEXCATALOG_BOT;
599 $this->setRobot(true);
612 if (stripos($this->_agent, 'YandexNews') !== false) {
613 $aresult = explode('/', stristr($this->_agent, 'YandexNews'));
616 $this->setVersion(str_replace(';', '', $aversion[0]));
617 $this->_browser_name = self::BROWSER_YANDEXNEWS_BOT;
618 $this->setRobot(true);
631 if (stripos($this->_agent, 'YandexMetrika') !== false) {
632 $aresult = explode('/', stristr($this->_agent, 'YandexMetrika'));
635 $this->setVersion(str_replace(';', '', $aversion[0]));
636 $this->_browser_name = self::BROWSER_YANDEXMETRIKA_BOT;
637 $this->setRobot(true);
650 if (stripos($this->_agent, 'YandexDirect') !== false) {
651 $aresult = explode('/', stristr($this->_agent, 'YandexDirect'));
654 $this->setVersion(str_replace(';', '', $aversion[0]));
655 $this->_browser_name = self::BROWSER_YANDEXDIRECT_BOT;
656 $this->setRobot(true);
669 if (stripos($this->_agent, 'YandexWebmaster') !== false) {
670 $aresult = explode('/', stristr($this->_agent, 'YandexWebmaster'));
673 $this->setVersion(str_replace(';', '', $aversion[0]));
674 $this->_browser_name = self::BROWSER_YANDEXWEBMASTER_BOT;
675 $this->setRobot(true);
688 if (stripos($this->_agent, 'YandexFavicons') !== false) {
689 $aresult = explode('/', stristr($this->_agent, 'YandexFavicons'));
692 $this->setVersion(str_replace(';', '', $aversion[0]));
693 $this->_browser_name = self::BROWSER_YANDEXFAVICONS_BOT;
694 $this->setRobot(true);
707 if (stripos($this->_agent, 'YandexBlogs') !== false) {
708 $aresult = explode('/', stristr($this->_agent, 'YandexBlogs'));
711 $this->setVersion(str_replace(';', '', $aversion[0]));
712 $this->_browser_name = self::BROWSER_YANDEXBLOGS_BOT;
713 $this->setRobot(true);
726 if (stripos($this->_agent, 'YandexMedia') !== false) {
727 $aresult = explode('/', stristr($this->_agent, 'YandexMedia'));
730 $this->setVersion(str_replace(';', '', $aversion[0]));
731 $this->_browser_name = self::BROWSER_YANDEXMEDIA_BOT;
732 $this->setRobot(true);
745 if (stripos($this->_agent, 'YandexVideo') !== false) {
746 $aresult = explode('/', stristr($this->_agent, 'YandexVideo'));
749 $this->setVersion(str_replace(';', '', $aversion[0]));
750 $this->_browser_name = self::BROWSER_YANDEXVIDEO_BOT;
751 $this->setRobot(true);
764 if (stripos($this->_agent, 'YandexImages') !== false) {
765 $aresult = explode('/', stristr($this->_agent, 'YandexImages'));
768 $this->setVersion(str_replace(';', '', $aversion[0]));
769 $this->_browser_name = self::BROWSER_YANDEXIMAGES_BOT;
770 $this->setRobot(true);
783 if (stripos($this->_agent, "msnbot") !== false) {
784 $aresult = explode("/", stristr($this->_agent, "msnbot"));
787 $this->setVersion(str_replace(";", "", $aversion[0]));
788 $this->_browser_name = self::BROWSER_MSNBOT;
789 $this->setRobot(true);
802 if (stripos($this->_agent, "bingbot") !== false) {
803 $aresult = explode("/", stristr($this->_agent, "bingbot"));
806 $this->setVersion(str_replace(";", "", $aversion[0]));
807 $this->_browser_name = self::BROWSER_BINGBOT;
808 $this->setRobot(true);
821 if (stripos($this->_agent, 'W3C-checklink') !== false) {
822 $aresult = explode('/', stristr($this->_agent, 'W3C-checklink'));
825 $this->setVersion($aversion[0]);
826 $this->_browser_name = self::BROWSER_W3CVALIDATOR;
829 } else if (stripos($this->_agent, 'W3C_Validator') !== false) {
831 $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent);
835 $this->setVersion($aversion[0]);
836 $this->_browser_name = self::BROWSER_W3CVALIDATOR;
839 } else if (stripos($this->_agent, 'W3C-mobileOK') !== false) {
840 $this->_browser_name = self::BROWSER_W3CVALIDATOR;
841 $this->setMobile(true);
853 if (stripos($this->_agent, 'slurp') !== false) {
854 $aresult = explode('/', stristr($this->_agent, 'Slurp'));
857 $this->setVersion($aversion[0]);
858 $this->_browser_name = self::BROWSER_SLURP;
859 $this->setRobot(true);
860 $this->setMobile(false);
873 if (stripos($this->_agent, 'Edge/') !== false) {
874 $aresult = explode('/', stristr($this->_agent, 'Edge'));
877 $this->setVersion($aversion[0]);
878 $this->setBrowser(self::BROWSER_EDGE);
879 …if (stripos($this->_agent, 'Windows Phone') !== false || stripos($this->_agent, 'Android') !== fal…
880 $this->setMobile(true);
895 if (stripos($this->_agent, 'Trident/7.0; rv:11.0') !== false) {
896 $this->setBrowser(self::BROWSER_IE);
897 $this->setVersion('11.0');
900 else if (stripos($this->_agent, 'microsoft internet explorer') !== false) {
901 $this->setBrowser(self::BROWSER_IE);
902 $this->setVersion('1.0');
903 $aresult = stristr($this->_agent, '/');
905 $this->setVersion('1.5');
909 … else if (stripos($this->_agent, 'msie') !== false && stripos($this->_agent, 'opera') === false) {
911 if (stripos($this->_agent, 'msnb') !== false) {
912 $aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'MSN'));
914 $this->setBrowser(self::BROWSER_MSN);
915 $this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
919 $aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'msie'));
921 $this->setBrowser(self::BROWSER_IE);
922 $this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
923 if(preg_match('#trident/([0-9\.]+);#i', $this->_agent, $aresult)){
925 $this->setVersion('7.0');
928 $this->setVersion('8.0');
931 $this->setVersion('9.0');
934 $this->setVersion('10.0');
937 $this->setVersion('11.0');
940 $this->setVersion('11.0');
943 if(stripos($this->_agent, 'IEMobile') !== false) {
944 $this->setBrowser(self::BROWSER_POCKET_IE);
945 $this->setMobile(true);
950 else if (stripos($this->_agent, 'trident') !== false) {
951 $this->setBrowser(self::BROWSER_IE);
952 $result = explode('rv:', $this->_agent);
954 $this->setVersion(preg_replace('/[^0-9.]+/', '', $result[1]));
955 $this->_agent = str_replace(array("Mozilla", "Gecko"), "MSIE", $this->_agent);
958 …else if (stripos($this->_agent, 'mspie') !== false || stripos($this->_agent, 'pocket') !== false) {
959 $aresult = explode(' ', stristr($this->_agent, 'mspie'));
961 $this->setPlatform(self::PLATFORM_WINDOWS_CE);
962 $this->setBrowser(self::BROWSER_POCKET_IE);
963 $this->setMobile(true);
965 if (stripos($this->_agent, 'mspie') !== false) {
966 $this->setVersion($aresult[1]);
968 $aversion = explode('/', $this->_agent);
970 $this->setVersion($aversion[1]);
985 if (stripos($this->_agent, 'opera mini') !== false) {
986 $resultant = stristr($this->_agent, 'opera mini');
991 $this->setVersion($aversion[0]);
996 $this->setVersion($aversion[1]);
999 $this->_browser_name = self::BROWSER_OPERA_MINI;
1000 $this->setMobile(true);
1002 } else if (stripos($this->_agent, 'opera') !== false) {
1003 $resultant = stristr($this->_agent, 'opera');
1005 $this->setVersion($matches[1]);
1010 $this->setVersion($aversion[0]);
1014 $this->setVersion(isset($aversion[1]) ? $aversion[1] : "");
1016 if (stripos($this->_agent, 'Opera Mobi') !== false) {
1017 $this->setMobile(true);
1019 $this->_browser_name = self::BROWSER_OPERA;
1021 } else if (stripos($this->_agent, 'OPR') !== false) {
1022 $resultant = stristr($this->_agent, 'OPR');
1027 $this->setVersion($aversion[0]);
1030 if (stripos($this->_agent, 'Mobile') !== false) {
1031 $this->setMobile(true);
1033 $this->_browser_name = self::BROWSER_OPERA;
1045 if (stripos($this->_agent, 'Chrome') !== false) {
1046 $aresult = explode('/', stristr($this->_agent, 'Chrome'));
1049 $this->setVersion($aversion[0]);
1050 $this->setBrowser(self::BROWSER_CHROME);
1052 if (stripos($this->_agent, 'Android') !== false) {
1053 if (stripos($this->_agent, 'Mobile') !== false) {
1054 $this->setMobile(true);
1056 $this->setTablet(true);
1072 if (stripos($this->_agent, 'webtv') !== false) {
1073 $aresult = explode('/', stristr($this->_agent, 'webtv'));
1076 $this->setVersion($aversion[0]);
1077 $this->setBrowser(self::BROWSER_WEBTV);
1090 if (stripos($this->_agent, 'NetPositive') !== false) {
1091 $aresult = explode('/', stristr($this->_agent, 'NetPositive'));
1094 $this->setVersion(str_replace(array('(', ')', ';'), '', $aversion[0]));
1095 $this->setBrowser(self::BROWSER_NETPOSITIVE);
1108 if (stripos($this->_agent, 'galeon') !== false) {
1109 $aresult = explode(' ', stristr($this->_agent, 'galeon'));
1112 $this->setVersion($aversion[1]);
1113 $this->setBrowser(self::BROWSER_GALEON);
1126 if (stripos($this->_agent, 'Konqueror') !== false) {
1127 $aresult = explode(' ', stristr($this->_agent, 'Konqueror'));
1130 $this->setVersion($aversion[1]);
1131 $this->setBrowser(self::BROWSER_KONQUEROR);
1144 if (stripos($this->_agent, 'icab') !== false) {
1145 $aversion = explode(' ', stristr(str_replace('/', ' ', $this->_agent), 'icab'));
1147 $this->setVersion($aversion[1]);
1148 $this->setBrowser(self::BROWSER_ICAB);
1161 if (stripos($this->_agent, 'omniweb') !== false) {
1162 $aresult = explode('/', stristr($this->_agent, 'omniweb'));
1164 $this->setVersion($aversion[0]);
1165 $this->setBrowser(self::BROWSER_OMNIWEB);
1177 if (stripos($this->_agent, 'Phoenix') !== false) {
1178 $aversion = explode('/', stristr($this->_agent, 'Phoenix'));
1180 $this->setVersion($aversion[1]);
1181 $this->setBrowser(self::BROWSER_PHOENIX);
1194 if (stripos($this->_agent, 'Firebird') !== false) {
1195 $aversion = explode('/', stristr($this->_agent, 'Firebird'));
1197 $this->setVersion($aversion[1]);
1198 $this->setBrowser(self::BROWSER_FIREBIRD);
1212 …if (stripos($this->_agent, 'Firefox') !== false && preg_match('/Navigator\/([^ ]*)/i', $this->_age…
1213 $this->setVersion($matches[1]);
1214 $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
1216 …} else if (stripos($this->_agent, 'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i', $th…
1217 $this->setVersion($matches[1]);
1218 $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
1230 …if (stripos($this->_agent, 'Mozilla') !== false && preg_match('/Shiretoko\/([^ ]*)/i', $this->_age…
1231 $this->setVersion($matches[1]);
1232 $this->setBrowser(self::BROWSER_SHIRETOKO);
1244 …if (stripos($this->_agent, 'Mozilla') !== false && preg_match('/IceCat\/([^ ]*)/i', $this->_agent,…
1245 $this->setVersion($matches[1]);
1246 $this->setBrowser(self::BROWSER_ICECAT);
1258 if (preg_match("/Nokia([^\/]+)\/([^ SP]+)/i", $this->_agent, $matches)) {
1259 $this->setVersion($matches[2]);
1260 … if (stripos($this->_agent, 'Series60') !== false || strpos($this->_agent, 'S60') !== false) {
1261 $this->setBrowser(self::BROWSER_NOKIA_S60);
1263 $this->setBrowser(self::BROWSER_NOKIA);
1265 $this->setMobile(true);
1277 if (stripos($this->_agent, 'safari') === false) {
1278 if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", $this->_agent, $matches)) {
1279 $this->setVersion($matches[1]);
1280 $this->setBrowser(self::BROWSER_FIREFOX);
1282 if (stripos($this->_agent, 'Android') !== false) {
1283 if (stripos($this->_agent, 'Mobile') !== false) {
1284 $this->setMobile(true);
1286 $this->setTablet(true);
1290 } else if (preg_match("/Firefox$/i", $this->_agent, $matches)) {
1291 $this->setVersion("");
1292 $this->setBrowser(self::BROWSER_FIREFOX);
1305 if (stripos($this->_agent, 'Iceweasel') !== false) {
1306 $aresult = explode('/', stristr($this->_agent, 'Iceweasel'));
1309 $this->setVersion($aversion[0]);
1310 $this->setBrowser(self::BROWSER_ICEWEASEL);
1323 …if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_a…
1324 $aversion = explode(' ', stristr($this->_agent, 'rv:'));
1325 preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_agent, $aversion);
1326 $this->setVersion(str_replace('rv:', '', $aversion[0]));
1327 $this->setBrowser(self::BROWSER_MOZILLA);
1329 …} else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i', $this->…
1330 $aversion = explode('', stristr($this->_agent, 'rv:'));
1331 $this->setVersion(str_replace('rv:', '', $aversion[0]));
1332 $this->setBrowser(self::BROWSER_MOZILLA);
1334 …} else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/mozilla\/([^ ]*)/i', $this-…
1335 $this->setVersion($matches[1]);
1336 $this->setBrowser(self::BROWSER_MOZILLA);
1348 if (stripos($this->_agent, 'lynx') !== false) {
1349 $aresult = explode('/', stristr($this->_agent, 'Lynx'));
1351 $this->setVersion($aversion[0]);
1352 $this->setBrowser(self::BROWSER_LYNX);
1364 if (stripos($this->_agent, 'amaya') !== false) {
1365 $aresult = explode('/', stristr($this->_agent, 'Amaya'));
1368 $this->setVersion($aversion[0]);
1369 $this->setBrowser(self::BROWSER_AMAYA);
1382 if (stripos($this->_agent, 'Safari') !== false
1383 && stripos($this->_agent, 'iPhone') === false
1384 && stripos($this->_agent, 'iPod') === false
1387 $aresult = explode('/', stristr($this->_agent, 'Version'));
1390 $this->setVersion($aversion[0]);
1392 $this->setVersion(self::VERSION_UNKNOWN);
1394 $this->setBrowser(self::BROWSER_SAFARI);
1402 if (stripos($this->_agent, 'SamsungBrowser') !== false) {
1404 $aresult = explode('/', stristr($this->_agent, 'SamsungBrowser'));
1407 $this->setVersion($aversion[0]);
1409 $this->setVersion(self::VERSION_UNKNOWN);
1411 $this->setBrowser(self::BROWSER_SAMSUNG);
1419 if (stripos($this->_agent, 'Silk') !== false) {
1420 $aresult = explode('/', stristr($this->_agent, 'Silk'));
1423 $this->setVersion($aversion[0]);
1425 $this->setVersion(self::VERSION_UNKNOWN);
1427 $this->setBrowser(self::BROWSER_SILK);
1435 if (stripos($this->_agent, 'Iframely') !== false) {
1436 $aresult = explode('/', stristr($this->_agent, 'Iframely'));
1439 $this->setVersion($aversion[0]);
1441 $this->setVersion(self::VERSION_UNKNOWN);
1443 $this->setBrowser(self::BROWSER_I_FRAME);
1451 if (stripos($this->_agent, 'CocoaRestClient') !== false) {
1452 $aresult = explode('/', stristr($this->_agent, 'CocoaRestClient'));
1455 $this->setVersion($aversion[0]);
1457 $this->setVersion(self::VERSION_UNKNOWN);
1459 $this->setBrowser(self::BROWSER_COCOA);
1471 if (stristr($this->_agent, 'FacebookExternalHit')) {
1472 $this->setRobot(true);
1473 $this->setFacebook(true);
1485 if (stristr($this->_agent, 'FBIOS')) {
1486 $this->setFacebook(true);
1498 $aresult = explode('/', stristr($this->_agent, 'Version'));
1501 $this->setVersion($aversion[0]);
1513 $aresult = explode('/', stristr($this->_agent, 'CriOS'));
1516 $this->setVersion($aversion[0]);
1517 $this->setBrowser(self::BROWSER_CHROME);
1529 if (stripos($this->_agent, 'iPhone') !== false) {
1530 $this->setVersion(self::VERSION_UNKNOWN);
1531 $this->setBrowser(self::BROWSER_IPHONE);
1532 $this->getSafariVersionOnIos();
1533 $this->getChromeVersionOnIos();
1534 $this->checkForFacebookIos();
1535 $this->setMobile(true);
1548 if (stripos($this->_agent, 'iPad') !== false) {
1549 $this->setVersion(self::VERSION_UNKNOWN);
1550 $this->setBrowser(self::BROWSER_IPAD);
1551 $this->getSafariVersionOnIos();
1552 $this->getChromeVersionOnIos();
1553 $this->checkForFacebookIos();
1554 $this->setTablet(true);
1566 if (stripos($this->_agent, 'iPod') !== false) {
1567 $this->setVersion(self::VERSION_UNKNOWN);
1568 $this->setBrowser(self::BROWSER_IPOD);
1569 $this->getSafariVersionOnIos();
1570 $this->getChromeVersionOnIos();
1571 $this->checkForFacebookIos();
1572 $this->setMobile(true);
1584 if (stripos($this->_agent, 'Android') !== false) {
1585 $aresult = explode(' ', stristr($this->_agent, 'Android'));
1588 $this->setVersion($aversion[0]);
1590 $this->setVersion(self::VERSION_UNKNOWN);
1592 if (stripos($this->_agent, 'Mobile') !== false) {
1593 $this->setMobile(true);
1595 $this->setTablet(true);
1597 $this->setBrowser(self::BROWSER_ANDROID);
1609 if (stripos($this->_agent, 'Vivaldi') !== false) {
1610 $aresult = explode('/', stristr($this->_agent, 'Vivaldi'));
1613 $this->setVersion($aversion[0]);
1614 $this->setBrowser(self::BROWSER_VIVALDI);
1627 if (stripos($this->_agent, 'YaBrowser') !== false) {
1628 $aresult = explode('/', stristr($this->_agent, 'YaBrowser'));
1631 $this->setVersion($aversion[0]);
1632 $this->setBrowser(self::BROWSER_YANDEX);
1634 if (stripos($this->_agent, 'iPad') !== false) {
1635 $this->setTablet(true);
1636 } elseif (stripos($this->_agent, 'Mobile') !== false) {
1637 $this->setMobile(true);
1638 } elseif (stripos($this->_agent, 'Android') !== false) {
1639 $this->setTablet(true);
1655 if (stripos($this->_agent, 'PlayStation ') !== false) {
1656 $aresult = explode(' ', stristr($this->_agent, 'PlayStation '));
1657 $this->setBrowser(self::BROWSER_PLAYSTATION);
1660 $this->setVersion($aversion[0]);
1661 … if (stripos($this->_agent, 'Portable)') !== false || stripos($this->_agent, 'Vita') !== false) {
1662 $this->setMobile(true);
1675 if (stripos($this->_agent, 'windows') !== false) {
1676 $this->_platform = self::PLATFORM_WINDOWS;
1677 } else if (stripos($this->_agent, 'iPad') !== false) {
1678 $this->_platform = self::PLATFORM_IPAD;
1679 } else if (stripos($this->_agent, 'iPod') !== false) {
1680 $this->_platform = self::PLATFORM_IPOD;
1681 } else if (stripos($this->_agent, 'iPhone') !== false) {
1682 $this->_platform = self::PLATFORM_IPHONE;
1683 } elseif (stripos($this->_agent, 'mac') !== false) {
1684 $this->_platform = self::PLATFORM_APPLE;
1685 } elseif (stripos($this->_agent, 'android') !== false) {
1686 $this->_platform = self::PLATFORM_ANDROID;
1687 } elseif (stripos($this->_agent, 'Silk') !== false) {
1688 $this->_platform = self::PLATFORM_FIRE_OS;
1689 …} elseif (stripos($this->_agent, 'linux') !== false && stripos($this->_agent, 'SMART-TV') !== fals…
1690 $this->_platform = self::PLATFORM_LINUX .'/'.self::PLATFORM_SMART_TV;
1691 } elseif (stripos($this->_agent, 'linux') !== false) {
1692 $this->_platform = self::PLATFORM_LINUX;
1693 } else if (stripos($this->_agent, 'Nokia') !== false) {
1694 $this->_platform = self::PLATFORM_NOKIA;
1695 } else if (stripos($this->_agent, 'BlackBerry') !== false) {
1696 $this->_platform = self::PLATFORM_BLACKBERRY;
1697 } elseif (stripos($this->_agent, 'FreeBSD') !== false) {
1698 $this->_platform = self::PLATFORM_FREEBSD;
1699 } elseif (stripos($this->_agent, 'OpenBSD') !== false) {
1700 $this->_platform = self::PLATFORM_OPENBSD;
1701 } elseif (stripos($this->_agent, 'NetBSD') !== false) {
1702 $this->_platform = self::PLATFORM_NETBSD;
1703 } elseif (stripos($this->_agent, 'OpenSolaris') !== false) {
1704 $this->_platform = self::PLATFORM_OPENSOLARIS;
1705 } elseif (stripos($this->_agent, 'SunOS') !== false) {
1706 $this->_platform = self::PLATFORM_SUNOS;
1707 } elseif (stripos($this->_agent, 'OS\/2') !== false) {
1708 $this->_platform = self::PLATFORM_OS2;
1709 } elseif (stripos($this->_agent, 'BeOS') !== false) {
1710 $this->_platform = self::PLATFORM_BEOS;
1711 } elseif (stripos($this->_agent, 'win') !== false) {
1712 $this->_platform = self::PLATFORM_WINDOWS;
1713 } elseif (stripos($this->_agent, 'Playstation') !== false) {
1714 $this->_platform = self::PLATFORM_PLAYSTATION;
1715 } elseif (stripos($this->_agent, 'Roku') !== false) {
1716 $this->_platform = self::PLATFORM_ROKU;
1717 } elseif (stripos($this->_agent, 'iOS') !== false) {
1718 $this->_platform = self::PLATFORM_IPHONE . '/' . self::PLATFORM_IPAD;
1719 } elseif (stripos($this->_agent, 'tvOS') !== false) {
1720 $this->_platform = self::PLATFORM_APPLE_TV;
1721 } elseif (stripos($this->_agent, 'curl') !== false) {
1722 $this->_platform = self::PLATFORM_TERMINAL;
1723 } elseif (stripos($this->_agent, 'CrOS') !== false) {
1724 $this->_platform = self::PLATFORM_CHROME_OS;
1725 } elseif (stripos($this->_agent, 'okhttp') !== false) {
1726 $this->_platform = self::PLATFORM_JAVA_ANDROID;
1727 } elseif (stripos($this->_agent, 'PostmanRuntime') !== false) {
1728 $this->_platform = self::PLATFORM_POSTMAN;
1729 } elseif (stripos($this->_agent, 'Iframely') !== false) {
1730 $this->_platform = self::PLATFORM_I_FRAME;