Page 1 of 1

Browser Info using PHP

Posted: Wed Jan 28, 2004 4:18 pm
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.

Posted: Wed Jan 28, 2004 4:31 pm
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