in reply to Random Image in HTML
if (opendir(PIZZA, "$dirname")) { @images = grep { -f "$dirname/$_" && m/\.gif|jpg|png/ } readdir(PIZZ +A); srand(); $image = $images[rand($#images+1)]; closedir(PIZZA); if (open(IMAGE, "$dirname/$image")) { $size = -s IMAGE; printf "Content-length: %d\n", -s IMAGE; printf "Content-type: image/%s\n\n", substr($image,-3); while (<IMAGE>) { print; } close(IMAGE); } closedir(PIZZA); } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Random Image in HTML
by merlyn (Sage) on Apr 26, 2000 at 01:17 UTC | |
|
RE: RE: Random Image in HTML
by swiftone (Curate) on May 17, 2000 at 23:18 UTC | |
by turnstep (Parson) on May 18, 2000 at 18:26 UTC | |
|
RE: RE: Random Image in HTML
by brick (Sexton) on May 27, 2000 at 03:07 UTC | |
by brick (Sexton) on Jun 03, 2000 at 06:48 UTC |