World Class Web Hosting
+1.877 724-7638

my pair account webmail

Web hosting services

 

about pair Networks

 

Contact Us

pairNIC Support

blog.pair.com

Call Us

  • +1.877 724-7638
  • +1.412 381-7247

Fax

  • +1.412 381-9997

E-mail Us

Web contact forms

Mailing Address

  • pair Networks, Inc.
    Suite 210
    2403 Sidney Street
    Pittsburgh, PA 15203-2168

support - knowledge base

 

Authoring/Development - randlink

Homepage:

http://www.scriptarchive.com/

Modifications Required:

No

Optional Modifications:

None recommended.

randlink is a script that chooses a random URL from a plain text list of them, and redirects the user to that URL. To use it, you must first create a file in your home directory named .randlink that contains a list of URLs, one per line. You may create this file directly on the server by SSH or create it on your own machine and upload it through FTP in ASCII mode. A sample .randlink file would look like:

http://www.pair.com/
http://support.pair.com/
http://www.quickserve.com/
http://www.pairlist.com/

Once the file is in place, You simply make an href link to the script as "/cgi-sys/randlink" . For instance:

<a href="/cgi-sys/randlink">Click Here To Visit A Random Link</a>

It is also possible to have multiple lists of links, by using a keyword for each one. In this case, the name of the list of links would be .randlink-keyword, and you would link to /cgi-sys/randlink?keyword to access it.

For instance, if you had a list of links to humorous sites, you might name your .randlink file:

.randlink-humor

And then link to it as:

<a href="/cgi-sys/randlink?humor">Click Here To Visit A Humorous Random Link</a>

Advanced users who are comfortable with editing their own cgi-scripts are still welcome to use the original version of this script as found at Matt's Script Archive. You can download or copy the original from /usr/www/cgi-bin/rand_link.cgi. There is probably little to gain in doing so, however.