Luckily, a Norwegian site has started the war on IE6, with this Wiki
They also include a php script there to upgrade or switch.
But, in my opinion, this script takes far from everything in account!
A better code I think is the following. Easier, and works on everything older as well!
<?php
if(eregi("msie", $_SERVER['HTTP_USER_AGENT'])){
$val = explode(" ",stristr($_SERVER['HTTP_USER_AGENT'],"msie"));
$version = explode(".", $val[1]);
if($version[0] <= 6){ ?>
Promotional text here, redirects to IE7 downloads, Firefox downloads, etc.
<?php
}
}
?>
Just replace the promotional text, or if you site is multi-lingual, create a language-dependant variable to be showed there!I think it's better, because this code is smaller, and easier, and faster, and just works too!
But, feel free to use any script, as long as we can battle outdated browsers.
source of code: Casa Laguna Coding Monkey












