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

Simple Multiple Destination Redirect Script?

Discussion in 'General Scripting Chat' started by Troshi, Jun 11, 2012.

  1. Troshi

    Troshi Senior Member

    Joined:
    Aug 19, 2011
    Messages:
    863
    Likes Received:
    105
    Occupation:
    Your job
    Location:
    Where you live
    I want to order some traffic and send it to multiple urls, but I can only use 1 url for the service. So I was hoping to have this 1 url redirect to my different urls evenly. Is there a script?
     
  2. Troshi

    Troshi Senior Member

    Joined:
    Aug 19, 2011
    Messages:
    863
    Likes Received:
    105
    Occupation:
    Your job
    Location:
    Where you live
    Also, the redirect urls are going to have to go through a bit.ly and a 3rd party url shortener before they get to the final tracking link, so I really need something quick.
     
  3. skrode

    skrode Junior Member

    Joined:
    Nov 13, 2011
    Messages:
    103
    Likes Received:
    16
    something like this?

    Code:
    <?php
    $urls = array(
        "url1",
        "url2",
        "url3"
    );
    
    header("Location: " . $urls[rand(0, count($urls) - 1)]);
    ?>
    
     
  4. boydie

    boydie Jr. VIP Jr. VIP

    Joined:
    May 16, 2010
    Messages:
    1,006
    Likes Received:
    147
    Location:
    Glasgow
    Home Page:
    Hi, does this only allow the target url to be redirected to once? or is it random
     
  5. upl8t

    upl8t Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    475
    Likes Received:
    84
    Location:
    New Scotland
    That script pulls a random url each time it's hit.... no limit.
     
  6. williamk

    williamk BANNED BANNED

    Joined:
    Oct 29, 2009
    Messages:
    1,030
    Likes Received:
    184
    If you want to buy traffic, I think typlo's service is pretty good. And you can also select the URLs to send the traffic to.