33 $HTTP_USER_AGENT = $_SERVER[
'HTTP_USER_AGENT'];
37 if(ereg(
'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(ereg(
'Opera ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
43 ereg(
'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(ereg(
'Safari ([0-9/.]*)',$HTTP_USER_AGENT,$log_version) ||
49 ereg(
'Safari/([0-9/.]*)',$HTTP_USER_AGENT,$log_version))
51 $this->BROWSER_VER = $log_version[1];
52 $this->BROWSER_AGENT =
'Safari';
54 elseif(ereg(
'Firefox ([0-9/.]*)',$HTTP_USER_AGENT,$log_version) ||
55 ereg(
'Firefox/([0-9/.]*)',$HTTP_USER_AGENT,$log_version))
57 $this->BROWSER_VER = $log_version[1];
58 $this->BROWSER_AGENT =
'Firefox';
60 elseif(eregi(
'iCab ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
61 eregi(
'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(eregi(
'Mozilla ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
67 eregi(
'Mozilla/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
69 $this->BROWSER_VER = $log_version[1];
70 if (ereg(
'Gecko',$HTTP_USER_AGENT,$log_version))
72 $this->BROWSER_AGENT =
'Mozilla';
76 $this->BROWSER_AGENT =
'Netscape';
79 elseif(ereg(
'Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
80 ereg(
'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);