Authoring/Development - rand_image.pl
Homepage:
http://nms-cgi.sourceforge.net/Modifications Required:
Yesrand_image.pl takes images you specify and randomly displays them on your Web site. It must be copied to your own Web directory and modified for your own use.
You will normally want to place rand_image.pl in a CGI directory, although this is not strictly required (because it has the .pl extension, it will execute as CGI from any directory).
To begin, copy the script into your Web directory. Use this sequence of commands when logged in by SSH:
cd ~/public_htmlNext, use your favorite text editor to modify the script. You will need to set four variables within the script:
cp /usr/www/cgi-bin/rand_image.pl cgi-bin/.
$use_redirect
You can set this to either 1 or 0. If set to 1, you'll be using the full URL to the images. If set to 0, you'll be using the full file path.$baseurl
If you have set $use_redirect to 1, fill in the URL of the images here (for example, http://www.example.com).$basedir
If you have set $use_redirect to 0, fill in the full file path to your images here (for example, /usr/www/users/USERNAME).@files
Fill in the names of all of the image files here. Make sure you remove the example file names, foo.jpg and bah.png.
Once you've made these changes, you can use the script in your HTML as if it was an image:
<img src="/cgi-bin/rand_image.pl">
Shortcut To This Article: http://kb.pair.com/f30




