Browser Info using PHP

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
cj2000
Forum Newbie
Posts: 7
Joined: Wed Jul 23, 2003 8:01 am

Browser Info using PHP

Post by cj2000 »

Hi guys,

wondering if it is possible to return the client's browser type (i.e. IE, netscape , mozilla etc ) using PHP??

What I am trying to do here is to direct DHTML supported browsers to a DHTML page and non-DHTML supported browsers to another page.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Code: Select all

<?
if ($name = strstr ($HTTP_USER_AGENT, "MSIE")) { //if its MSIE then
    Header ("Location: http://www.espantoso.com/"); //go to espantoso
} 
else { 
    Header ("Location: http://www.eurocentro-ecuador.org.ec/"); //else go to ecuador.org
} 
?>
And to just have it printed out the browser take a look @ this
http://aspn.activestate.com/ASPN/docs/P ... owser.html

That is all i know, maby you can do something with that
Post Reply