View Full Version : Random Link Script
fernand
12-04-2000, 01:04 AM
Does anybody know about a Random Link Script that sends uniques or at least based on a ratio? (Such as 20% out to A, 10% to B and so on)
jello
12-04-2000, 08:05 PM
<script LANGUAGE="JavaScript">
<!-- Begin
var howMany = 2; // max number of items listed below
var page = new Array(howMany+1);
page[0]="http://.htm";
page[1]="http://.htm";
page[2]="http://.htm";
function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
// End -->
</script>
this one is tottaly random
jello
12-04-2000, 08:10 PM
do multiple listings of the same url in that script to give it a higher percentage
fernand
12-04-2000, 11:42 PM
Thanx jello, I'll try it
Fernand
I got a perl script for you that will do the trick. Free.
fernand
12-06-2000, 07:32 PM
cool ace, how do I get it?
richard
12-06-2000, 07:36 PM
ah but Jello, is it _truely_ random?
http://adultwebmasterinfo.com/ubb/wink.gif that stuff messes with your mind
Usefull free service 4 redirecting users based on given probabilitys
Usefull free service 4 redirecting users based on given probabilitys http://www.socc.f2s.com/trd
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.