Here’s a quick and dirty snippet to detect IE6 and add a big ugly warning to all pages if it’s being used:
<?php
$output='';
$oldIE=false;
$ua=strtolower($_SERVER['HTTP_USER_AGENT']);
if((strstr($ua,"win")) && (strstr($ua,"msie")) && !(strstr($ua,"opera"))){
$all_browser_info=explode(" ",stristr($ua,"msie"));
$IEversion=$all_browser_info[1];
if($IEversion<7){
$oldIE=true;
}
}
if ($oldIE==true){
$output='<div id="ie6">
<h1>Your browser needs to be updated</h1>
<p>You appear to be using Internet Explorer 6.<br /><strong>This browser was released in 2001 and our website - along with many others - may not display or function properly</strong> with such an outdated browser.<br />In addition, <strong>this browser is not secure</strong>, and browsing the internet with it may expose you to many more risks.</p>
<p>Please use one of the links below (or Windows Update) to upgrade your browser now.</p>
<p><a href="http://www.microsoft.com/windows/internet-explorer/" target="_ie8">Internet Explorer 8</a> | <a href="http://www.mozilla.com/en-US/firefox/" target="_ff">Mozilla Firefox</a></p>
<p>Note: If you are in a corporate or other environment where you cannot install or update software on your own, please contact your technical support staff<br />to resolve this. This is not a condition that should continue to be ignored.</p>
</div>
';
}
return $output;
?>
I’ve added this (uncached) just below the opening body tag. You can/should edit the output to include a chunk instead of hard-coding the warning message into the snippet. Like I said, this is quick and dirty...