#!/usr/bin/perl @files=('img1.jpg','img2.jpg','img3.jpg'); $r = rand(4700)%(scalar(@files)); $file = $files[$r]; print "Content-type: image/"; print ((split(/\./,$file)[1]=='jpg')?'jpeg':'gif'); print "\n\n"; if (open(FID,$file)){ while($data = <FID>){ print $data; } close(FID); }
In reply to Re: random image
by iamcal
in thread random image
by yuri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |