| Home | About Us | Web Hosting Plans & Pricing | Satisfied Customers | Support & Help | Contact Us |
| Active-Sites Support | ||||
|
Random Image Generation You can add random images to your web pages by using Server Side Includes in your .shtml files. The images that you want displayed randomly must be in the /images folder of your site. Then you must edit the file 'ssi_rand_image.pl' in your cgi-bin directory. The lines you must change are as follows: 1. @images = ("one.gif","two.jpg","three.gif"); Replace these with the names of your images. Make sure to keep a comma between them. 2. @urls = ("http://www.timehost.net", "http://www.microsoft.com", "http://www.yahoo.com"); These are the links that people will go to when your images are loaded. They are relevant to the placement of the images in the @images array. For example, if the script chooses 'two.jpg' as the image to display, then it will link to http://www.microsoft.com 3. @alt = ("First WWW Page","Second WWW Page","Third WWW Page"); These are labels for your images, which are displayed if the person accessing your site has images disabled, or the images are slow in loading. Again they are relevant to the placement of the images in the @images array. Now, wherever you want to display the random image, insert the following code segment: <!--#exec cgi="cgi-bin/ssi_rand_image.pl"--> Remember that this only works in a file with the extension .shtml, it will not work in a standard .html file. |
|||
| Copyright 2008 ® Active-Sites.com All Rights Reserved About Us | Terms Of Use Policy | Privacy Policy | Web Hosting Packages Contact Us |