Re: Is there a way to determine wich browser a visitor uses in php?

From: Date: Wed, 23 Nov 2005 08:55:20 +0000
Subject: Re: Is there a way to determine wich browser a visitor uses in php?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-226336@lists.php.net to get a copy of this message
$_SERVER['HTTP_USER_AGENT'] contains whatever the browser passes to the server to identify itself, which may be faked by certain browsers at the discretion of the user. The two user agents you provide as an example are both extremely common. Cheers, David Grant twistednetadmin wrote: > Thanks guys. That helps alot! > > But this: > <?php > print $_SERVER['HTTP_USER_AGENT']; > ?> > > Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; > rv:1.7.12) Gecko/20050915 Firefox/1.0.7 > And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) > > Does that just mean that it's not completely accurate? >

« previous php.general (#226336) next »