Parsing HTTP_USER_AGENT

From: Date: Sat, 16 Aug 2003 22:29:39 +0000
Subject: Parsing HTTP_USER_AGENT
Groups: php.general 
Request: Send a blank email to php-general+get-159847@lists.php.net to get a copy of this message
Hello: What I'm trying to do is parse the HTTP_USER_AGENT into formatted text. Here's an example: PHP gets user's browser and OS through with HTTP_USER_AGENT. The output should only say: You are running on Windows XP and using IE6! How would I parse this. One example would be fine. I know I have to do it for every possibility, right? Is there a way for me to do it so that, it only outputs the major browsers such as Mozilla, Opera, Netscape or IE? Also, what would I do to parse the OS? Finally, here is the project I'm working on: http://members.lycos.co.uk/xtrinity/golucky/image.php I'm trying to make it like Vipersig: http://www.danasoft.com/vipersig.jpg Thanks!

« previous php.general (#159847) next »