|Select from the following table of contents to jump to a specific area within this README file. This is a HTML version of the README file distributed with Random Link Generator.
|Random Link Generator
|Copyright 1996-2002 Matt Wright
|Last Modified 07/30/95
|Matt's Script Archive, Inc.:
|If you run into any problems while trying to configure this scripts, help is available. The steps you should take to get the fastest results, are:
1) Read this file thoroughly.
2) Consult the Matt's Script Archive Frequently Asked Questions:
3) If you are still having difficulty installing this script,
you may wish to look at the resources listed here:
Hopefully that will be able to help you solve your problems. Due to time
constraints I can no longer offer technical support for this code.
Copyright 1995 - 2002 Matthew M. Wright All Rights Reserved.
Random Link Generator may be used and modified free of charge by anyone so long as this
copyright notice and the comments above remain intact. By using this
code you agree to indemnify Matthew M. Wright from any liability that
might arise from its use.
Selling the code for this program without prior written consent is
expressly forbidden. In other words, please ask first before you try and
make money off of my program.
Obtain permission before redistributing this software over the Internet or
in any other medium. In all cases copyright and header must remain intact.
This Random Link Script was originally written to be part of my Free For All Links Script, but I thought that I could also break it down and send it out as a small script for those people wanting to run their own Random Link Page. It should be relatively easy to set up.
There are three files included in this package. They are:
1. README - This file.
2. rand_link.pl - The Perl File that calls the Random Link.
3. rand_link.html - An Example HTML of how to call the script.
4. rand_log - A blank log file.
This is one of the more simple scripts that I have written and it only has one variable that you must set up and another if you choose to use the logging option.
This file must be placed in the cgi-bin of your server and chmoded to 755, so that it is readable and executable by all users. There is one variable in here, described below:
$linkfile = "";
This is the database of links. Links must be placed in this database, without any markup, one per line.
$uselog = "";
This determines whether you want to use the log or not. If you do you will simply get a log of the Remote Host and the time they took the random link. If you set this to '1' it turns logging on, otherwise it is off by default. If you do turn this option on you must also fill in $logfile below.
$logfile = "";
This is the actual file system location of your log file. It must be chmoded read/write (666) for everyone and placed in a directory with like permissions.
This is just an example of a random link html file. You can do whatever you want with it, hack it up, remove it, etc. It simply shows how you can call the script. The whole file really wasn't even necessary for me to place in this package. I could have just explained all you now need to do is point your html browser to the rand_link.pl file. So I could let users take a random link simply by having the line in my html file:
<a href="http://www.scriptarchive.com/demos/links/rand_link.pl">Take a random link!</a>
Its as simple as that.