random_gallery

Latest Version: 1.1

Examples

Below I include the HTML that I use to call random_gallery with. I use server side includes, for the most part, to include the output from random_gallery, but you could probably do all kinds of other things. To see what the program returns, you can look at the source of this page.

There are only ten images in the example gallery, so don't be surprised if you get multiples on this example page.


This will return just the image, using the default random selection mechanism, meaning it will be different every time you load this page.

<!--#include virtual="gallery/random_gallery.cgi?return=image" -->

Hubble Finds Many Bright Clouds on Uranus


This is the same as above, but the image is wrapped in a link that leads to the full page for this image in the gallery.

<!--#include virtual="gallery/random_gallery.cgi?return=image&gallery_link=image" -->

Hubble Finds Many Bright Clouds on Uranus


This is the same as the first, but it includes the caption for the image.

<!--#include virtual="gallery/random_gallery.cgi?return=image,caption" -->

Venus - Computer Simulated Global ViewThis global view of the surface of Venus is centered at 180 degrees east longitude. Magellan synthetic aperture radar mosaics from the first cycle of Magellan mapping are mapped onto a computer-simulated globe to create this image. Data gaps are filled with Pioneer Venus Orbiter data, or a constant mid-range value. Simulated color is used to enhance small-scale structure. The simulated hues are based on color images recorded by the Soviet Venera 13 and 14 spacecraft. The image was produced by the Solar System Visualization project and the Magellan science team at the JPL Multimission Image Processing Laboratory and is a single frame from a video released at the October 29, 1991, JPL news conference. (PIA00104)


This will show the same image all day.

<!--#include virtual="gallery/random_gallery.cgi?return=image,caption&gallery_link=image&select=daily" -->

Venus - Computer Simulated Global ViewThis global view of the surface of Venus is centered at 180 degrees east longitude. Magellan synthetic aperture radar mosaics from the first cycle of Magellan mapping are mapped onto a computer-simulated globe to create this image. Data gaps are filled with Pioneer Venus Orbiter data, or a constant mid-range value. Simulated color is used to enhance small-scale structure. The simulated hues are based on color images recorded by the Soviet Venera 13 and 14 spacecraft. The image was produced by the Solar System Visualization project and the Magellan science team at the JPL Multimission Image Processing Laboratory and is a single frame from a video released at the October 29, 1991, JPL news conference. (PIA00104)


This specifies to always return the sun.jpg image.

<!--#include virtual="gallery/random_gallery.cgi?return=image&select=sun.jpg" -->

sun.jpg


This uses just the return=url option. The downside is that you can't use random_gallery to automatically write the alt and title attributes this way.

<img src="gallery/random_gallery.cgi?return=url" alt="URL only return">

URL only return


This also uses the return=url option, but does so from within the specification of Cascading Style Sheets to make the background of this div randomize.

<div style="height:300px; width:300px; color:white; background-image: url(gallery/random_gallery.cgi?select=random&return=url);">
<h3>Random Backgrounds with CSS</h3>
</div>

Random Backgrounds with CSS