Get Browser type

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cesar
Forum Commoner
Posts: 31
Joined: Sat May 22, 2004 1:35 am

Get Browser type

Post by Cesar »

Help!
What can I know name of web-browser and it version.
I like know come out from a version of web-browser is larger than MSIE 5.0.

Thank you.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Code: Select all

$_SERVER['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 [php_man]get_browser[/php_man]() to tailor your page's output to the capabilities of the user agent.
Cesar
Forum Commoner
Posts: 31
Joined: Sat May 22, 2004 1:35 am

Post by Cesar »

Thanks.
But I like be after HTTP_USER_AGENT this finde name and version in vars each by each.

Thanks
d_d
Forum Commoner
Posts: 33
Joined: Wed Jul 07, 2004 4:56 pm
Location: UK

Post by d_d »

http://www.zytrax.com/tech/web/browser_ids.htm
and even more
http://www.pgts.com.au/pgtsj/pgtsj0208c.html

You can't be 100% certain because some browers send MSIE 6 string as a work around for sites that reject anything but MSIE for no reason.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Post Reply