# Change this to the directory where your GIF images are kept. # Make sure a final slash appears. This is NOT a file # system path; it is the URL on your server where # the images can be found. $imageDirUrl = "/~boutell/images/"; print "Content-type: text/html\n\n"; print "\n"; print "\n"; print "Random Inline Images Demonstration\n"; print "\n"; print "\n"; print "

Random Inline Images Demonstration

\n"; print "

This page contains one of four possible inline images,\n"; print "selected at random.\n"; # Seed the random number generator. Uses the current time as a seed. srand; # Choose an image. $choice = rand % 4; # Format the URL. $imagePath = $imageDirUrl . "/" . $choice . ".gif"; # Output the tag. print "\n"; print "\n"; print "\n"; exit 0;