note 18188 added to function.get-browser

From: Date: Mon, 14 Jan 2002 00:03:43 +0000
Subject: note 18188 added to function.get-browser
Groups: php.notes 
Request: Send a blank email to php-notes+get-24781@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')) { } -- http://www.php.net/manual/en/function.get-browser.php http://master.php.net/manage/user-notes.php?action=edit+18188 http://master.php.net/manage/user-notes.php?action=delete+18188 http://master.php.net/manage/user-notes.php?action=reject+18188

« previous php.notes (#24781) next »