I'll post the code I use for you.
CODE
<?php
$crrnt_version = @implode("",file("_PATH_TO_LATEST_VERSION_FILE_"));
$val = preg_replace("/^v(.+?)\.(.+?)/","\\1.\\2",$_GET['v']);
$val = preg_replace( "/\\\$/" , "$" , $val ); // Yeah, I doubt it
$val = preg_replace( "/\r/" , "" , $val ); // Remove literal carriage returns
$val = str_replace( "&" , "&" , $val ); // Change out amp;
$val = str_replace( "<!--" , "<!--" , $val ); // No HTML Comments!
$val = str_replace( "-->" , "-->" , $val ); // ^
$val = preg_replace( "/<script/i" , "<script" , $val ); // So you want to run a script? I don't think so
$val = preg_replace( "/\n/" , "<br>" , $val ); // Convert literal newlines
$val = str_replace( "!" , "!" , $val ); // No Excl!
$val = str_replace( ">" , ">" , $val ); // No >
$val = str_replace( "<" , "<" , $val ); // No <
$val = str_replace( "\"" , """ , $val ); // No Quotes
$val = str_replace( "'" , "'" , $val ); // IMPORTANT: It helps to increase sql query safety.
if ($val!=$crrnt_version)
{
header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('content-type: image/gif');
readfile('_PATH_TO_UPDATE_IMAGE_');
}
elseif ($val==$crrnt_version)
{
header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('content-type: image/gif');
readfile('_PATH_TO_UPDATE_TO_DATE_IMAGE_');
}
?>
Call that code like so:
CODE
<a href='_PATH_TO_YOUR_SITE_'><img src='_PATH_TO_SCRIPT_FILE_?v={$yours}' alt='version check down' border='0' /></a>
Make sure its a GIF image. You can modify the script to use a PNG or JPEG.
You can play around with the code to see what goodies you come up with.

Chad