Thread: Wine Web Site
View Single Post
Old Sep 30th, 2006, 3:33 AM   #22
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Exactly.
Quote:
Originally Posted by PHP Manual
'HTTP_USER_AGENT'

Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser() to tailor your page's output to the capabilities of the user agent.
I use it, myself, for the hacks on the page, but it isn't a done deal. One can also use browser-sniffing or capabilities on the client side, if using client side script.

Example:
	if ($firstSub)		
        {
		$outfile [] = '<ul class="';
		if ($thisUn  || ($browser == "IE")) $outfile [] = 'open';
		$outfile [] = 'sub" id="sub">'."\n";
	}
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers

Last edited by DaWei; Sep 30th, 2006 at 3:46 AM.
DaWei is offline   Reply With Quote