Приглашаем посетить
Есенин (sergeiesenin.lit-info.ru)

Random Link

##############################################################################
# Random Link                   Version 1.0                                  #
# Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
# Created 7/15/95               Last Modified 7/30/95                        #
# Scripts Archive at:           http://www.worldwidemart.com/scripts/        #
##############################################################################
# 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.worldwidemart.com/scripts/faq/	             #
#       3) If you are still having difficulty installing this script, send   #
#          e-mail to: scripts-help@tahoenet.com				     #
#          Include any error messages you are receiving and as much detail   #
#          as you can so we can spot your problem.  Also include the variable#
#          configuration block that is located at the top of the script.     #
#									     #
# Hopefully we will be able to help you solve your problems.  Thank you.     #
##############################################################################
# COPYRIGHT NOTICE                                                           #
# Copyright 1996 Matthew M. Wright  All Rights Reserved.                     #
#                                                                            #
# Random Link 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 it's 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:
        README          - This file
        rand_link.pl    - The Perl File that calls the Random Link
        rand_link.html  - An Example HTML of how to call the script
        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.

RAND_LINK.PL
        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:

                # 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.

When you are done configuring these options you can move to the rand_link.html 
file.

----------------

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://worldwidemart.com/cgi-bin/rand_link.pl">Take a random 
link!</a>

Its as simple as that.
_____________________________________________________________________

Use this script freely.  All I ask is that you let me know the url of where 
you are implementing this script and that you keep my name in it somewhere.  
Not necessarily anywhere viewable by your users (It would be nice though), but 
at least in the scripts.  Enjoy!
_____________________________________________________________________________
Matt Wright - mattw@worldwidemart.com - http://www.worldwidemart.com/scripts/