Home arrow PHP Tutorials

Translate This Website
Sunday, 07 September 2008
Web Development
Request a Quote
Script Categories
RSS Media Grabber Funny Videos & Pictures Life Stories (Flash) Video Search & Download Video Downloader Script Country on Sale Advanced Polls Phone Upload/SMS Scripts PhotoCube Script SlideShow Creation Script Make Confessions Scripts Guitar Tabs Scripts Create Custom Smiley Script Short URLs & Subdomains Hot Or Not Game Scripts Put your text on images Watermark & Image Hosting Joomla Components Low Cost Scripts
Partners
WEBSITE TRAFFIC
Pissed Customers
Credit Cards
Broadband Tweaks & Info
eBay Sniping Software
Custom Programming
Scripts and Stuffs
Hot php scripts
Add your scripts
Script Search
php scripts directory
script heaven
the cgi site
Scripts
Software Development
Free Icons
SEO Services


Browser Redirect Print E-mail

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 spoono.com

  2. If the browser isn't MSIE, then redirect to yahoo.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:

<?
//if its MSIE then
if ($name = strstr ($HTTP_USER_AGENT, "MSIE"))
{
//go to Spoono
Header ("Location: http://www.spoono.com/");
}
else
{
//else go to Yahoo
Header ("Location: http://www.yahoo.com/");
}
?>

Credit: www.spoono.com 





Reddit!Del.icio.us!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Free social bookmarking plugins and extensions for Joomla! websites!
 
< Prev   Next >
Services
Script Installation
Hosting
Free Image Hosting
PageRank Checker
Login Form
On Sale
Country on Sale Script
Country on Sale Script
$49.99
$29.99
You Save: $20.00
Add to Cart
Home Announcements Support Newsletter Forum PHP Articles PHP Tutorials Scripts FAQs Free Scripts Links Contacts
Copyrighted © 2008 phppod.com