#!/usr/bin/perl @files=('img1.jpg','img2.jpg','img3.jpg'); print "Content-type: image/" .(((split(/\./,$file=$files[ (rand(4700)%(scalar(@files)) )]))[1]=='jpg')?'jpeg':'gif' ) . "\n\n" ; if ( open (FID, $file)){ while(<FID>){ print $_; } close(FID); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: random image
by iamcal (Friar) on Jun 06, 2001 at 11:36 UTC |