Randomizing redirect paths?

andre09

Junior Member
Joined
Jul 15, 2008
Messages
173
Reaction score
260
Does anyone have a script or know a method to make a redirect link randomly select different paths? For example if my redirect was www.xxxx.com/loans it would redirect to three possible auto loan sites, being randomly picked each time? Thanks!
 
I think what your referring to is a URL rotator. You can use this one here:

hxxp://cashtactics.net/free-ruck-reports/
 
You've got a couple of choices...I incorporated this into my software that I posted here:

http://www.blackhatworld.com/blackhat-seo/making-money/23402-double-metarefresh-generator-v1.html

Or if you want to do it by hand, you can use the code below:

Code:
<?php 
$page0 = "";
$referer = $_SERVER['HTTP_REFERER'];
$mypages = array($page0);
$myrandompage = $mypages[mt_rand(0, count($mypages) -1)];
if($referer == "")
    {
        echo "<meta http-equiv=\"refresh\" content=\"0;url=$myrandompage\">";
    }
else
    {
    	echo "<meta http-equiv=\"refresh\" content=\"0;url=rd1.php\">";
    }
?>

For each of your links, you'd need to add a $page variable ($page0, $page1, $page2 for three links) with your links between the " "...if you don't want the referer check, you can omit that...

ND
 
This should be easy enough, just add more urls if you wish :)

Code:
<?PHP

srand((float) microtime() * 10000000);

$url_list = array("http://site.com",
                  "http://site2.com",
                  "http://site3.com",
                  "http://site4.com",
                  "http://site5.com");

header('Location: '.$url_list[rand(0,count($url_list))]);

?>
 
thank you for the code bosshog. i just added this to my double meta refresh with ability to specify referer. instead of one landing page, i now have as many as i choose - when means more realistic results/stats. simple, but effective!
 
Back
Top