#!/usr/local/bin/perl # This filename must be changed. The file it points to # must contain a list of GIF files on your system, # specified by complete paths. $gifListFile = "/CHANGE/THIS/PATH/giflist.txt"; $choice = 0; $_ = $ENV{'PATH_INFO'}; if (/\/(\d+).gif/) { $choice = $1; } open(IN, $gifListFile); @list = ; close(IN); if ($choice != $#list) { print "Refresh: 10; URL=", $choice+1, ".gif\n"; } # Now output the file print "Content-type: image/gif\n\n"; $list[$choice] =~ s/\n//g; open(IN, $list[$choice]); while (read(IN, $buffer, 4096)) { print $buffer; } close(IN); exit 0;