random-image?Using
random-image in your
web-siteAn example
What is random-image?
random-image is a CGI (common gateway interface)
script that allows a user to randomly display a GIF or JPEG image from
a collection of images in a special directory
How to use random-image in your
web-site.
First, create a directory in your home directory using your favorite FTP client (like fetch for Macintosh or WsFTP for windows). You should name this directory something appropriate, such as images or random_images, but it doesn't really matter. In this directory put a collection of GIF or JPEG images that you wish to have randomized. In the page that you wish to have the random image, insert the HTML code:
<img src=http://www.vineyard.net/cgi-bin/random-image?dir=DIRNAME&user=USERNAME>Replace DIRNAME with the name of the directory that you created, and USERNAME with your Vineyard.NET username.
An example
Joeuser has created a directory in his home directory named
images, and he put the images dog.gif,
cat.gif, and fish.jpg into images. Into his
web-page he inserted the code:
<img
src=http://www.vineyard.net/cgi-bin/random-image?dir=images&user=joeuser>and from now on, anyone who visits joeuser's website will either see dog.gif, cat.gif or fish.jpg.
Many web-browsers may continue to show the same image even after reloading a page, because they do not intelligently update their cache. Hopefully such difficulties will be addressed in new versions of the product.