#! /usr/bin/perl
# tv-2pederpaars150.JPG tv-2pederpaars3012.jpg tv-2cool2.JPG
# 98-forsideill-1.JPG
# fra 990117 98-forsideill-3.JPG
# indtil 981202 980805-forsideill.JPG
# fra 981202 98-forsideill-1.JPG, fra981226 nytaar98-99.gif
# fra 990201 "karakterbog-forside.jpg"
# fra 990301-990308 "tv-2-train-forside.jpg" 
# fra 990509 99-forsideill-live99-1.jpg, 99-forsideill-live99-2.jpg, 
# 99-forsideill-live99-3.jpg, 99-forsideill-live99-4.jpg, 
# 99-forsideill-live99-5.jpg, 99-forsideill-live99-6.jpg
# 99-forsideill-live99-7.jpg, 99-forsideill-live99-8.jpg
# fra 9911 
# 99-forsideill-havuds-1b.jpg","99-forsideill-havuds-2b.jpg","99-forsideill-havuds-3b.jpg","99-forsideill-havuds-coverb.jpg"
# fra 9912 tv-2-juleforsideill-1999.jpg
# fra 9901 som 9911
# fra 990706
# 99-forsideill-livemf-1.jpg, 99-forsideill-livemf-2.jpg, 
# 99-forsideill-livemf-3.jpg, 99-forsideill-livemf-4.jpg, 
# 99-forsideill-livemf-5.jpg, 99-forsideill-livemf-6.jpg
# 99-forsideill-livemf-7.jpg, 99-forsideill-livemf-8.jpg
# 99-forsideill-havuds-cover.jpg","99-forsideill-havuds-cover.jpg
# Necessary Variables
  $basedir = "http://tv-2.dk/";
  @files = ("index-sog.html","index-sog.html");

# Options
  $uselog = 0; # 1 = YES; 0 = NO
        $logfile = "/home/mattw/public_html/image/pics/piclog";

# Done
##############################################################################

srand(time ^ $$);
$num = rand(@files); # Pick a Random Number

# Print Out Header With Random Filename and Base Directory
print "Location: $basedir$files[$num]\n\n";

# Log Image
if ($uselog eq '1') {
    open (LOG, ">>$logfile");
    print LOG "$files[$num]\n";
    close (LOG);
}
