note 18188 deleted from function.get-browser by irc-html

From: Date: Mon, 21 Jan 2002 05:38:26 +0000
Subject: note 18188 deleted from function.get-browser by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25612@lists.php.net to get a copy of this message
Kevin Thompson's solution posted on... 10-Apr-2001 04:10 ... incorrectly identifies MS Internet Explorer 6.0 as "Netscape". The line causing this: elseif(eregi("(mozilla) /([0-9]{1,2}.[0-9]{1,3})",$HTTP_USER_AGENT,$match)) { $BName = "Netscape "; $BVersion=$match[2]; } IE6.0 reports itself as: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461) I gave up and switched back to testing to see if the browser was IE by doing: if (!strstr(getenv('HTTP_USER_AGENT'), 'MSIE')) { }

« previous php.notes (#25612) next »