1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Randomizing redirect paths?

Discussion in 'Cloaking and Content Generators' started by andre09, Sep 7, 2008.

  1. andre09

    andre09 Junior Member

    Joined:
    Jul 15, 2008
    Messages:
    174
    Likes Received:
    257
    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!
     
  2. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    I think what your referring to is a URL rotator. You can use this one here:

    hxxp://cashtactics.net/free-ruck-reports/
     
  3. nesterdwarf

    nesterdwarf Regular Member

    Joined:
    May 30, 2008
    Messages:
    276
    Likes Received:
    539
    Location:
    State of Misery...er, Missouri...
    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
     
  4. bosshog

    bosshog Newbie

    Joined:
    Mar 15, 2008
    Messages:
    43
    Likes Received:
    3
    Occupation:
    web programmerr
    Location:
    texas
    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))]);
    
    ?>
    
     
    • Thanks Thanks x 1
  5. casper

    casper Newbie

    Joined:
    Sep 26, 2008
    Messages:
    48
    Likes Received:
    35
    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!