Public Member Functions | |
| getOS ($agent) | |
Private Attributes | |
| $osSearchOrder | |
| $osAlias | |
Definition at line 16 of file mosOSData.php.
| mosOSData::getOS | ( | $ | agent | ) |
Definition at line 79 of file mosOSData.php.
00079 { 00080 foreach ($this->osSearchOrder as $key) { 00081 if (preg_match( "/$key/i", $agent )) { 00082 return $this->osAlias[$key]; 00083 } 00084 } 00085 return 'Unknown'; 00086 }
mosOSData::$osSearchOrder [private] |
Initial value:
array ( "windows nt 6\.0", "windows nt 5\.2", "windows nt 5\.1", "windows nt 5\.0", "winnt4\.0", "winnt", "windows 98", "windows 95", "win98", "win95", "mac os x", "debian", "freebsd", "linux", "ppc", "beos", "sunos", "apachebench", "aix", "irix", "osf", "hp-ux", "netbsd", "bsdi", "openbsd", "gnu", "unix" )
Definition at line 18 of file mosOSData.php.
mosOSData::$osAlias [private] |
Initial value:
array ( "windows nt 6\.0"=>"Windows Longhorn", "windows nt 5\.2"=>"Windows 2003", "windows nt 5\.0"=>"Windows 2000", "windows nt 5\.1"=>"Windows XP", "winnt"=>"Windows NT", "winnt 4\.0"=>"Windows NT", "windows 98"=>"Windows 98", "win98"=>"Windows 98", "windows 95"=>"Windows 95", "win95"=>"Windows 95", "sunos"=>"Sun Solaris", "freebsd"=>"FreeBSD", "ppc"=>"Macintosh", "mac os x"=>"Mac OS X", "linux"=>"Linux", "debian"=>"Debian", "beos"=>"BeOS", "winnt4\.0"=>"Windows NT 4.0", "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 system" )
Definition at line 48 of file mosOSData.php.
1.5.5