in reply to Random Image in HTML
Some notes:
- 'opendir' should check its result, perhaps with a "|| die"
- 'srand' should not be in the subroutine, since it could be called
more than once in the same script.
- The whole subroutine could probably be collapsed into an inner loop.
- If the directory is empty, the script will enter an infinite loop!
- Outputing a 'Content-size' to the browser would be nice.
- This does not actually return the image to the HTML page,
but a location. Strange, but workable for most browsers.