Thread: Script Question
View Single Post
Old 03-19-2002, 05:39 PM  
s9ann0
Confirmed User
 
Join Date: Sep 2001
Location: Boston
Posts: 4,873
#!/usr/bin/perl
$where = $ENV{'QUERY_STRING'};

#This is the url to your out script
###################################
$url = "http://cz3.clickzs.com/cj2.php?username";

# url's array use as many as u want

@out_urls = (
'http://blah.com/blah1',
'http://www.222blah.com/blah2',
'http://blah564.com/blkah.htm'
);

#What percentage of surfers should go to the intended gallery
##################################################

###########
$pig = "70";

srand;
$n = int rand(100);
if ($n < $pig)
{
print "Location: $where\n\n";
}
else
{
print "Location: $out_urls[(int rand(@out_urls))]\n\n";
}
s9ann0 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote