- or download this
#!/usr/bin/perl -wT
use strict;
...
# Call in img tag - e.g.: <img src="randimage.cgi" border="2">
my @files = glob("./jpegs/*.jpg");
print "Location: $files[int(rand @files)]\n\n";
- or download this
#!/usr/bin/perl -wT
use strict;
...
my $file = URI->new_abs($files[int(rand @files)], "http://bugzilla");
print "Status: 307 Temporary redirect\n";
print "Location: $file\n\n";
- or download this
#!/usr/bin/perl -wT
use strict;
...
binmode (STDOUT);
print while(<IMG>);
close IMG;