Welcome to Anythingweb.org  
You are not Logged in! Log in to check your messages.

Today's:
Popular Articles and Posts:

PHP Browser Redirect Tutorial


Submitted by: web_guy
Hits:3316
A situation may come up when you want to redirect a user depending on what browser they are using. Below in a simple script that you can add to any PHP page that will redirect a user depending on what broswer they are using.


The code above is pretty simple. First, we check to see if the user is using Microsoft Internet Explorer. If they are, we will redirect them to http://www.msn.com

If the user is using a different browser (FireFox, Safaria, Opera, etc..) they will be directed to www.google.com. Pretty Simple!