is there any function in php which find out the 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
mayanktalwar1988
Forum Contributor
Posts: 133
Joined: Wed Jul 08, 2009 2:44 am

is there any function in php which find out the browser type

Post by mayanktalwar1988 »

hey is there any function in php which can find out the type of browser the user is using to open a site and then i want to carry out differnt code acording to the browser type is there any in php ......to find out the type whether iis it internet explorer or mozzilaa
is there any?
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: is there any function in php which find out the browser type

Post by cpetercarter »

Google for "php user agent".
mayanktalwar1988
Forum Contributor
Posts: 133
Joined: Wed Jul 08, 2009 2:44 am

Re: is there any function in php which find out the browser type

Post by mayanktalwar1988 »

ok..
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: is there any function in php which find out the browser type

Post by jackpf »

$_SERVER['HTTP_USER_AGENT'] contains the browser's user agent sent in the header for the page request.
Post Reply