Enter a search term check the script type and click submit. To search for a general category for example to find all results for scripts working with text files or file manipulation enter file or curl. Same for directory, sql etc. Otherwise use specific terms.
Here is the script you requested.
cgiscripts/random-link.txt: 2519 bytes
generate random links for display with this simple cgi perl new script
great for text ads links
cgi
random link
randon-link date added Jan 2013
#! /usr/local/bin/perl
###############################
###############
################################
# Random Link Vers
ion 1.0
#
# Copyright 1996 Matt Wrig
ht mattw@scriptarchive.com
#
# Created 7/15/9
5 Last Modified 7/30/95 #
# Scri
pts
Archive at: http://www.scriptarchive.com/
#
##############################
####################################
############
# COPYRIGHT NOTICE
#
# Copyright 1996 Matthew M. Wright All Rights
Reserved.
#
#
#
# Random L
ink may be used
and modified free of charge by anyone so long as #
# this copyright
notice and t
he comments above remain intact. By using this #
# code
you agree to indemnify Matthew M. Wright f
rom any liability that
#
# might arise from it's use.
#
#
#
# Selling
the code for this program without pr
ior written consent is #
# expressly forbidden. In ot
her wor
ds, please ask first before you try and #
# make money off of my pro
gram.
#
#
#
# Obta
in permission before redistributing this software over the Internet or
#
# in any
other medium. In all cases copyright and header must rem
ain intact.#
############################
############################
######################
# Define Variables
$linkfile = "/home/scrip
tar
chive/demos/links/database";
# Options
$uselog = 1;
# 1 = YES; 0 = NO
$logfile = "/h
ome/scriptarchive/demos/links/rand
_log";
$date = `date +"%D"`; chop($date);
# Done
##############
################################################################
op
en (LINKS, "$linkfile");
sran
d(); # kick ran
d
$nlines=@file=<LINKS>; # inhale file & get # of li
nes
print "Location: $file[int rand $nlines]\n\n";
# print a random line
close (LINKS);
if ($use
log eq '1') {
open (LOG, ">>$logfile");
print LOG "$ENV{'REMOTE_HOST'} - [$date
]\n";
clos
e (LOG);
}
exit;
Post a comment
No comments yet