this sample will pick up an animated gif file with todays date ie "1-15-01.gif" and show it.
function Image_Error($Err_Msg){
$im = ImageCreate (200, 30); / Create a blank image /
$background = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 0, 0, 0);
ImageFilledRectangle ($im, 0, 0, 200, 30, $background);
ImageString($im, 3, 5, 5, $Err_Msg, $black);
ImageGif($im);
exit;
}
$file_name = date("n-j-y") . ".gif";
$fp = @fopen("$file_name","r");
if (!$fp) Image_Error("File Not Found!");
$img_data = fread($fp,filesize("$file_name"));
if (!$img_data) Image_Error("No Data!");
fclose($fp);
header("Content-type: image/gif");
echo $img_data;