Learn how to do a Browser Redirect using the power of PHP.
Alright, this is a simple little script which will take you to one page if you're using Internet Explorer, and another page if you're using some other browser. Lets decide what this is going to do in English:
1. If the browser is MicroSoft Internet Explorer (MSIE), then go to KingPinServers.com
2. If the browser isn't MSIE, then redirect to OneXFX.com.
The most essential part of this is that this code has to be sent out before any output to the HTML page. Make sure it is the first line of code on your PHP page. With that said, here is the PHP:
Code:
<?
//if its MSIE then
if ($name = strstr ($HTTP_USER_AGENT, "MSIE"))
{
//go to KingPinServers
Header ("Location: http://www.KingPinServers.com/");
}
else
{
//else go to OneXFX
Header ("Location: http://www.OneXFX.com/");
}
?>