55 $HTTP_USER_AGENT = $_SERVER[
'HTTP_USER_AGENT'];
59 if(ereg(
'MSIE ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
61 $this->BROWSER_VER = $log_version[1];
62 $this->BROWSER_AGENT =
'IE';
64 elseif(ereg(
'Opera ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
65 ereg(
'Opera/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
67 $this->BROWSER_VER = $log_version[1];
68 $this->BROWSER_AGENT =
'OPERA';
70 elseif(ereg(
'Safari ([0-9/.]*)',$HTTP_USER_AGENT,$log_version) ||
71 ereg(
'Safari/([0-9/.]*)',$HTTP_USER_AGENT,$log_version))
73 $this->BROWSER_VER = $log_version[1];
74 $this->BROWSER_AGENT =
'Safari';
76 elseif(ereg(
'Firefox ([0-9/.]*)',$HTTP_USER_AGENT,$log_version) ||
77 ereg(
'Firefox/([0-9/.]*)',$HTTP_USER_AGENT,$log_version))
79 $this->BROWSER_VER = $log_version[1];
80 $this->BROWSER_AGENT =
'Firefox';
82 elseif(eregi(
'iCab ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
83 eregi(
'iCab/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
85 $this->BROWSER_VER = $log_version[1];
86 $this->BROWSER_AGENT =
'iCab';
88 elseif(eregi(
'Mozilla ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
89 eregi(
'Mozilla/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
91 $this->BROWSER_VER = $log_version[1];
92 if (ereg(
'Gecko',$HTTP_USER_AGENT,$log_version))
94 $this->BROWSER_AGENT =
'Mozilla';
98 $this->BROWSER_AGENT =
'Netscape';
101 elseif(ereg(
'Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
102 ereg(
'Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
104 $this->BROWSER_VER=$log_version[1];
105 $this->BROWSER_AGENT=
'Konqueror';
109 $this->BROWSER_VER=0;
110 $this->BROWSER_AGENT=
'OTHER';
116 if(strstr($HTTP_USER_AGENT,
'Win'))
118 $this->BROWSER_PLATFORM=
'Win';
120 elseif(strstr($HTTP_USER_AGENT,
'Mac'))
122 $this->BROWSER_PLATFORM=
'Mac';
124 elseif(strstr($HTTP_USER_AGENT,
'Linux'))
126 $this->BROWSER_PLATFORM=
'Linux';
128 elseif(strstr($HTTP_USER_AGENT,
'Unix'))
130 $this->BROWSER_PLATFORM=
'Unix';
132 elseif(strstr($HTTP_USER_AGENT,
'Beos'))
134 $this->BROWSER_PLATFORM=
'Beos';
138 $this->BROWSER_PLATFORM=
'Other';
166 if($this->BROWSER_AGENT ==
'IE')
196 return explode(
".", $this->BROWSER_VER);