While I agree in principal, you must remember that not all UAs (User 
Agents) comply with the Standards, especially newer ones like XHTML, 
CSS 2, etc. Even a somewhat mainstream UA, like OmniWeb, for example 
(because I've been having problems with it lately) will not render 
your page the same as, say, IE or NS4 or the Gecko engine.

To answer your question without coding for you, search some 
JavaScript sites for UA detection scripts. Then, translate them into 
PHP (I'd say just use the JS, but 1: Not all UAs support JS, 2: those 
who do support JS may have it turned off by user preference, and 3: 
this is, after all, a PHP list ;)
I once saw a beautiful script which detected everything from Netscape 
to IE to Sun's UA to Amaya to Opera, iCab, OmniWeb, Mozilla, 
Konqueror, WebTV, etc, and versions of each, too, then grouped the 
UAs together by capability (which standards they support/do not 
support), and redirected appropriately. I, unfortunately, cannot 
remember where I saw this script. May have been at 
(there are some good ones there). Or, try's Web Builder 
Chris Garaffa

At 9:58 AM -0400 6/27/02, Erik Price wrote:
>On Thursday, June 27, 2002, at 08:57  AM, Patrick Teague wrote:
>>Has anyone else done something similar to this?  The main purpose for doing
>>this is to find out what clients are using the most so that we can provide
>>content more specific to the browsers.  I've noticed things that work on Win
>>MSIE don't look half the same on Mac MSIE, not to mention the differences
>>between MSIE, Konqueror, & Mozilla.   The other reason is I have people
>>developing stuff on Mac, Linux, & Windoze.  I'm trying to put together
>>something sane to mesh all of these together.
>The best thing you can do is make every attempt to code to the 
>standards, and then hope that the browsers do their best to meet 
>those standards too.  You could argue with my opinion on this, 
>saying that "Well that's just not realistic because everyone's using 
>IE" or whatever, but then something like AOL's decision to use 
>Mozilla as its internal browser engine comes along and changes the 
>whole paradigm.  Boom, you now have to change your entire site 
>because now most people aren't using IE.
>Coding to the standards is your best option.  In my opinion.  Good luck.
>Erik Price
>Web Developer Temp
>Media Lab, H.H. Brown
>PHP General Mailing List (
>To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to