How to detect browsers with $HTTP_USER_AGENT

From: Date: Tue, 12 Dec 2000 18:11:04 +0000
Subject: How to detect browsers with $HTTP_USER_AGENT
Groups: php.general 
Request: Send a blank email to php-general+get-29918@lists.php.net to get a copy of this message
Hello everybody, Usually I log my web site activity including the User Agent string that is returned by the client's browser. I would like to implement something like Netscape but using PHP. I need to create a function to identify what comes through the User Agent content and write it back in a friendly way : For instance : Mozilla/4,0 (compatible; MSIE 5.5; Windows 98) = Internet Explorer 5.5 OS Windows 98 Mozilla/4.76 [en] (X11; U; Linux2.2.16-22.i586) = Netscape 4.76 under Linux Is there any patterns or rules that aplly to the User Agent variable? How could I accomplish that? Thank you, Carlos Fernando Scheidecker Antunes

« previous php.general (#29918) next »