View Single Post
Old 2005-08-19, 08:58 PM   #5
2ndChance
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
2ndChance's Avatar
 
Join Date: Aug 2005
Posts: 20
SO I thought I would post what I did
Code:
open (RANDOMLINKS,"$data_server_path$randomlinks") || print "Could not open $data_server_path$randomlinks $! \n";
@FILE = <RANDOMLINKS>;
close(RANDOMLINKS);
$links = join('',@FILE);
@links = split(/\n/,$links);
srand(time ^ $$);
$link = rand(@links);
print "<BR>$links[$link]";
$link2 = rand(@links);
print "<BR>$links[$link2]";
$link3 = rand(@links);
print "<BR>$links[$link3]";
This will pull three random lines from a text file spit them out.
If anybody wants to use this as a randomizer by itself contact me and I will send it to you in a zip file configured so you can use it.

Last edited by 2ndChance; 2005-08-19 at 09:12 PM.. Reason: added details
2ndChance is offline   Reply With Quote