Вход Регистрация
Файл: wapxl.ru/top/func.php
Строк: 147
<?php

// функция определения браузера
function browser()
    {

    
$browsers = array(
    
'OPR'            => 'Opera',
    
'Flock'            => 'Flock',
    
'Edge'            => 'Spartan',
    
'Chrome'        => 'Chrome',
    
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
    
'Opera.*?Version'    => 'Opera',
    
'Opera'            => 'Opera',
    
'MSIE'            => 'Internet Explorer',
    
'Internet Explorer'    => 'Internet Explorer',
    
'Trident.* rv'    => 'Internet Explorer',
    
'Shiira'        => 'Shiira',
    
'Firefox'        => 'Firefox',
    
'Chimera'        => 'Chimera',
    
'Phoenix'        => 'Phoenix',
    
'Firebird'        => 'Firebird',
    
'Camino'        => 'Camino',
    
'Netscape'        => 'Netscape',
    
'OmniWeb'        => 'OmniWeb',
    
'Safari'        => 'Safari',
    
'Mozilla'        => 'Mozilla',
    
'Konqueror'        => 'Konqueror',
    
'icab'            => 'iCab',
    
'Lynx'            => 'Lynx',
    
'Links'            => 'Links',
    
'hotjava'        => 'HotJava',
    
'amaya'            => 'Amaya',
    
'IBrowse'        => 'IBrowse',
    
'Maxthon'        => 'Maxthon',
    
'Ubuntu'        => 'Ubuntu Web Browser',
    
'obigo'            => 'Obigo',
    
'netfront'        => 'Netfront Browser',
    
'openwave'        => 'Openwave Browser',
    
'mobilexplorer'    => 'Mobile Explorer',
    
'operamini'        => 'Opera Mini',
    
'opera mini'    => 'Opera Mini',
    
'opera mobi'    => 'Opera Mobile',
    
'fennec'        => 'Firefox Mobile'
);

            foreach (
$browsers as $key => $val)
            {
                if (
preg_match('|'.$key.'.*?([0-9.]+)|i'core::$agn$match))
                {
                    return 
$browsers[$key];
                }
            }

        return 
0;
    }



// функция определения операционной системы
function os()
    {

    
$os = array(
'windows nt 10.0'    => 'Windows 10',
    
'windows nt 6.3'    => 'Windows 8.1',
    
'windows nt 6.2'    => 'Windows 8',
    
'windows nt 6.1'    => 'Windows 7',
    
'windows nt 6.0'    => 'Windows Vista',
    
'windows nt 5.2'    => 'Windows 2003',
    
'windows nt 5.1'    => 'Windows XP',
    
'windows nt 5.0'    => 'Windows 2000',
    
'windows nt 4.0'    => 'Windows NT 4.0',
    
'winnt4.0'            => 'Windows NT 4.0',
    
'winnt 4.0'            => 'Windows NT',
    
'winnt'                => 'Windows NT',
    
'windows 98'        => 'Windows 98',
    
'win98'                => 'Windows 98',
    
'windows 95'        => 'Windows 95',
    
'win95'                => 'Windows 95',
    
'windows phone'            => 'Windows Phone',
    
'windows'            => 'Unknown Windows OS',
    
'android'            => 'Android',
    
'blackberry'        => 'BlackBerry',
    
'iphone'            => 'iOS',
    
'ipad'                => 'iOS',
    
'ipod'                => 'iOS',
    
'os x'                => 'Mac OS X',
    
'ppc mac'            => 'Power PC Mac',
    
'freebsd'            => 'FreeBSD',
    
'ppc'                => 'Macintosh',
    
'linux'                => 'Linux',
    
'debian'            => 'Debian',
    
'sunos'                => 'Sun Solaris',
    
'beos'                => 'BeOS',
    
'apachebench'        => 'ApacheBench',
    
'aix'                => 'AIX',
    
'irix'                => 'Irix',
    
'osf'                => 'DEC OSF',
    
'hp-ux'                => 'HP-UX',
    
'netbsd'            => 'NetBSD',
    
'bsdi'                => 'BSDi',
    
'openbsd'            => 'OpenBSD',
    
'gnu'                => 'GNU/Linux',
    
'unix'                => 'Unknown Unix OS',
    
'symbian'             => 'Symbian OS'
);

            foreach (
$os as $key => $val)
            {
                if (
preg_match('|'.$key.'.*?([0-9.]+)|i'core::$agn$match))
                {
                    return 
$os[$key];
                }
            }


        return 
0;
    }


// функция определения ботов поисковиков
function robot()
    {

$robots = array(
    
'googlebot'        => 'Googlebot',
    
'msnbot'        => 'MSNBot',
    
'baiduspider'        => 'Baiduspider',
    
'bingbot'        => 'Bing',
    
'slurp'            => 'Inktomi Slurp',
    
'yahoo'            => 'Yahoo',
    
'ask jeeves'        => 'Ask Jeeves',
    
'fastcrawler'        => 'FastCrawler',
    
'infoseek'        => 'InfoSeek Robot 1.0',
    
'lycos'            => 'Lycos',
    
'yandex'        => 'YandexBot',
    
'mediapartners-google'    => 'MediaPartners Google',
    
'CRAZYWEBCRAWLER'    => 'Crazy Webcrawler',
    
'adsbot-google'        => 'AdsBot Google',
    
'feedfetcher-google'    => 'Feedfetcher Google',
    
'curious george'    => 'Curious George'
);

            foreach (
$robots as $key => $val)
            {
                if (
preg_match('|'.$key.'.*?([0-9.]+)|i'core::$agn$match))
                {
                    return 
$robots[$key];
                }
            }


        return 
0;
    }

?>
Онлайн: 1
Реклама