URL Forwarding Question!!! (Rotator)

Discussion in 'Making Money' started by darkmarth, Mar 2, 2010.

  1. darkmarth

    darkmarth Junior Member

    Joined:
    Aug 12, 2008
    Messages:
    160
    Likes Received:
    41
    Location:
    Bay Area!
    Quick Question!

    So I have a url which I need to forward to 1 of several urls ---> Example!

    www.mywebsite.com ----forwards to ---> www.othersite.com
    or ---> www.secondwebsite.com
    or ---> www.thridwebsite.com

    Is there a php code or script which I can use to forward traffic to various sites?
    PLEASE help! thank you!


    TRIED THIS SCRIPT --- DIDNT WORK :/
    <?php
    $urls = array("www.site1.com",
    "www.site2.com",
    "www.site3.com");
    $url = $urls[array_rand($urls)];
    header("Location: http://$url");
    ?>
     
  2. mointernet

    mointernet Regular Member

    Joined:
    Apr 21, 2008
    Messages:
    340
    Likes Received:
    156
    Code:
    http://ljscripts.com/freescripts/
     
  3. Keedev

    Keedev Regular Member

    Joined:
    Apr 2, 2008
    Messages:
    290
    Likes Received:
    100
    Any offer rotator will do that. Except you're just substituting the offer for the url.

    Code:
    http://prosper.tracking202.com/scripts/rotate-offers/
     
    • Thanks Thanks x 1
  4. auvlais

    auvlais Newbie

    Joined:
    Apr 12, 2015
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    me too i'm looking for , pls help
     
  5. tasburrfoot

    tasburrfoot Regular Member

    Joined:
    Dec 16, 2008
    Messages:
    337
    Likes Received:
    156
    PHP:
    <?php
    $urls 
    = array("www.site1.com",
    "www.site2.com",
    "www.site3.com");

    $url $urls[mt_rand(0,count($urls))];

    header('location: http://'.$url);

    ?>
    Try that.