Re: get_browser();

From: Date: Tue, 19 Feb 2002 06:13:48 +0000
Subject: Re: get_browser();
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-85345@lists.php.net to get a copy of this message
> > Use this to identify Netscape 4.x: > > > > if(strstr($HTTP_USER_AGENT,"Mozilla/4") && > > !strstr($HTTP_USER_AGENT,"MSIE")){ > > // is Netscape 4 > > } else { > > // is something else > > } > > > > Is that going to catch the Mozilla spoofers, like webtv and opera? Err, no... if they are being spoofed then why would it? Open a phpinfo() page in each of the browsers you wish to correctly identify, then you can see what user agent you need to search for to do whatever with... :) ------------------------------------------------------------------------ Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ ------------------------------------------------------------------------

« previous php.general (#85345) next »