33 $HTTP_USER_AGENT = $_SERVER[
'HTTP_USER_AGENT'];
37 if(preg_match(
'/MSIE ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
39 $this->BROWSER_VER = $log_version[1];
40 $this->BROWSER_AGENT =
'IE';
42 elseif(preg_match(
'/Opera ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
43 preg_match(
'/Opera\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
45 $this->BROWSER_VER = $log_version[1];
46 $this->BROWSER_AGENT =
'OPERA';
48 elseif(preg_match(
'/Safari ([0-9\/.]*)/',$HTTP_USER_AGENT,$log_version) ||
49 preg_match(
'/Safari\/([0-9\/.]*)/',$HTTP_USER_AGENT,$log_version))
51 $this->BROWSER_VER = $log_version[1];
52 $this->BROWSER_AGENT =
'Safari';
54 elseif(preg_match(
'/Firefox ([0-9\/.]*)/',$HTTP_USER_AGENT,$log_version) ||
55 preg_match(
'/Firefox\/([0-9\/.]*)/',$HTTP_USER_AGENT,$log_version))
57 $this->BROWSER_VER = $log_version[1];
58 $this->BROWSER_AGENT =
'Firefox';
60 elseif(preg_match(
'/iCab ([0-9].[0-9a-zA-Z]{1,4})/',$HTTP_USER_AGENT,$log_version) ||
61 preg_match(
'/iCab\/([0-9].[0-9a-zA-Z]{1,4})/',$HTTP_USER_AGENT,$log_version))
63 $this->BROWSER_VER = $log_version[1];
64 $this->BROWSER_AGENT =
'iCab';
66 elseif(preg_match(
'/Mozilla ([0-9].[0-9a-zA-Z]{1,4})/',$HTTP_USER_AGENT,$log_version) ||
67 preg_match(
'/Mozilla\/([0-9].[0-9a-zA-Z]{1,4})/',$HTTP_USER_AGENT,$log_version))
69 $this->BROWSER_VER = $log_version[1];
70 if (preg_match(
'/Gecko/',$HTTP_USER_AGENT,$log_version))
72 $this->BROWSER_AGENT =
'Mozilla';
76 $this->BROWSER_AGENT =
'Netscape';
79 elseif(preg_match(
'/Konqueror\/([0-9].[0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
80 preg_match(
'/Konqueror\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
82 $this->BROWSER_VER=$log_version[1];
83 $this->BROWSER_AGENT=
'Konqueror';
88 $this->BROWSER_AGENT=
'OTHER';
94 if(strstr($HTTP_USER_AGENT,
'Win'))
96 $this->BROWSER_PLATFORM=
'Win';
98 elseif(strstr($HTTP_USER_AGENT,
'Mac'))
100 $this->BROWSER_PLATFORM=
'Mac';
102 elseif(strstr($HTTP_USER_AGENT,
'Linux'))
104 $this->BROWSER_PLATFORM=
'Linux';
106 elseif(strstr($HTTP_USER_AGENT,
'Unix'))
108 $this->BROWSER_PLATFORM=
'Unix';
110 elseif(strstr($HTTP_USER_AGENT,
'Beos'))
112 $this->BROWSER_PLATFORM=
'Beos';
116 $this->BROWSER_PLATFORM=
'Other';
144 if($this->BROWSER_AGENT ==
'IE')
174 return explode(
".", $this->BROWSER_VER);