Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread David Grant
$_SERVER['HTTP_USER_AGENT'] contains whatever the browser passes to the server to identify itself, which may be faked by certain browsers at the discretion of the user. The two user agents you provide as an example are both extremely common. Cheers, David Grant twistednetadmin wrote: Thanks

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread Frank Armitage
twistednetadmin wrote: Thanks guys. That helps alot! But this: ?php print $_SERVER['HTTP_USER_AGENT']; ? Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread Yaswanth Narvaneni
Dirty Code if((ereg(Nav, getenv(HTTP_USER_AGENT))) || (ereg(Gold, getenv(HTTP_USER_AGENT))) || (ereg(X11, getenv(HTTP_USER_AGENT))) || (ereg(Mozilla, getenv( HTTP_USER_AGENT))) || (ereg(Netscape, getenv(HTTP_USER_AGENT))) AND (!ereg(MSIE, getenv(HTTP_USER_AGENT $c_browser = Netscape;

[PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread twistednetadmin
Is it possible to use PHP to find out wich type of browser is in use? Or must is this done by javascript or something else? I would like to have a little statistic on my page that tells me what browser is currently moet used.

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread Joe Wollard
On Nov 23, 2005, at 12:43 AM, twistednetadmin wrote: Is it possible to use PHP to find out wich type of browser is in use? Or must is this done by javascript or something else? I would like to have a little statistic on my page that tells me what browser is currently moet used. Try: ?php

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread twistednetadmin
Thanks guys. That helps alot! But this: ?php print $_SERVER['HTTP_USER_AGENT']; ? Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Does that just mean