home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
What CD? 20
/
WPCFEB98.ISO
/
MULTI
/
HOTMETAL
/
CGI.Z
/
rand_img.pl
< prev
next >
Wrap
Perl Script
|
1997-06-20
|
870b
|
31 lines
#! /bin/perl
# Random Image Displayer
# Version 1.2 Created by: Matt Wright
# Created On: 7/1/95 Last Modified: 7/17/95
# I can be reached at: mattw@misha.net
# Scripts Archive at: http://worldwidemart.com/scripts/
# The file README contains more information and installation instructions.
# Necessary Variables
$basedir = "http://yourserver/youruserid/images/";
#insert the names of your images here
@files = ("orangeba.gif","blueball.gif","greenbal.gif");
# Options
$uselog = 0; # 1 = YES; 0 = NO
$logfile = "/home/youruserid/public_html/piclog";
srand;
$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);
}
exit;