MSA - Matt's Script Archive SurveyFactory - Create and publish online web surveys
 Matt's Script Archive: Random Link Generator: ReadmeView All Readme Files @ MSA
 
  Other sites by Matt:
 FormMail.com
  - hosted form processor
 SurveyFactory
  - hosted survey software
 CGI Resource Index
  - 3,000+ Perl Scripts!
 PHP Resource Index
  - 2,000+ PHP Scripts!
 chumpsoft, inc.
  - online survey software


  Matt's Script Archive
    FormMail
    Guestbook
    WWWBoard
    Simple Search
    Counter
    TextCounter
    Random Text
    TextClock
    Free for all Links
    Random Link
      > Readme 
      Download
      FAQ
    HTTP Cookie Library
    Countdown
    Random Image
    SSI Random Image
    TextCounter C++
    TextClock C++

Table of Contents
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.
Copyright and Header
Random Link GeneratorVersion 1.0
Copyright 1996-2002 Matt Wrightmattw@scriptarchive.com
Created 07/15/95Last Modified 07/30/95
Matt's Script Archive, Inc.:http://www.scriptarchive.com/

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:
          http://www.scriptarchive.com/faq/
      3) If you are still having difficulty installing this script,
          you may wish to look at the resources listed here:
          http://www.scriptarchive.com/help/

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 NOTICE:
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.
Overview
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.
rand_link.pl
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:

 Necessary Variables

  $linkfile = "";
This is the database of links. Links must be placed in this database, without any markup, one per line.

 Options

  $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.
rand_link.html
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.

 

FormMail.com :: HTML Form to Email Processor
[ Linking to MSA | Advertising Opportunities | Contact Matt ]
© 1995 - 2009 Matt Wright and Matt's Script Archive, Inc.