
August 6th, 1999, 11:30 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
For some reason it's not documented well at php.net, but there's a function called get_browser(). The Core PHP Programming book touches on this a bit. The function relies on browscap.ini, which is available from http://php.netvision.net.il/browscap/ . Here's the example from the book:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
Syntax: object get_browser(string user_agent)
<?
$browser = get_browser();
print("You are using " . $browser->browser . "<BR>n");
if($browser->javascript)
{
print("Your browser supports JavaScript.<BR>n");
}
?>[/quote]
Hope that helps.
- Scott
------------------
-----
Scott Stevenson
Maxify.com
|