bartop


dot pictureservices picturedot picturesupport picture
dot picturecontact picturedot pictureabout picture
dot picturehome picture

header

Navigation

Home
About BIGSEA
Support
Contact
Services
Clients
Rev9


Discussion

Today's Discussion
Create New Topic
List by Topic


Search BIGSEA

Excite Search
Atomz Search:


Advanced Atomz



Installing Matt's Random Link Generator

If you've got a multitude of links and not enough space to display them all, how about using Matt's Random Link generator to mix it up a bit? This script randomly selects a URL from a database file within your web site and displays the URL link from your web page. Each time your web page loads a different link appears.

Installation Procedure

  1. Locate and download the following files from <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive:
    • rand_link.pl - The Perl script which generates the random link.
       
  2. Change the first line of the Perl script to reflect the official path to Perl on our server:

    #!/usr/local/bin/perl

    * Note: This is required since the application is written in Perl.

  3. There are a few more things that need to be changed in the Perl script:

    # Define Variables
    $linkfile = The system path to the database containing the URLs.

    The system path is not the same as a URL. If your domain name was yourdomain.com the system path would be /u/web/yourdo where "yourdo" is the account userID.

    As such, the Define Variables section of the Links script would follow this format:

    # Set Variables $linkfile = "/u/web/<userid>/database.txt";

    Be sure to substitute your domain name and userID in the example above. Although Matt's code is accurate, we recommend using the Perl Script Checker within your account Control Panel when installing any Perl script.

  4. Upload the "rand_link.pl" script to your cgi-local directory in ASCII transfer mode. Cgi-local will place the appropriate permissions on files uploaded to this directory so you do NOT need to chmod 755 the Perl script.
     
  5. Create the database.txt file which contains the URL links and upload it to your root ("home") directory in ASCII transfer mode. Make one column of URLs and be sure to use absolute paths (e.g. http://www.randomsite.com). If desired, this script can be used in conjunction with the database file maintained by Matt's Free For All Link script.
     
    Here is a sample database.txt file:
    http://www.cnn.com
    http://www.news.com
    http://www.cnet.com
    http://www.yahoo.com
    http://www.lycos.com
    http://www.webcrawler.com

 

To test the script, add the following tags to your HTML document:

<a href="/cgi-local/rand_link.pl">Random Link</a>

 

Special Notes

  • Some possible causes of a SERVER ERROR:
    • Set Variables section within Perl script inaccurate
    • Perl script was not uploaded in ASCII transfer mode

Prev | Next | Installing Matt's Random Link Generator


BIGSEA
A metaphor. A philosophy. A way of doing business.

Copyright 1997-2001 - Last update: Wednesday, March 21, 2001 at 2:06:51 PM