Simple script to rotate landing pages?

Discussion in 'Programming' started by Alpha13, Oct 17, 2009.

  1. #1
    I need a script that will output a URL that will randomly redirect to one of my landing pages (to evenly distribute traffic from a single source) Anyone know of a good script to accomplish this?

    PS prosper202 wont work since my traffic does not come through a search engine.
     
    Alpha13, Oct 17, 2009 IP
  2. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Something like this?

    
    <?
    $sites = array(
       "http://google.com",
       "http://yahoo.com",
       "http://bing.com",
       "http://digg.com",
       "http://amazon.com");
    
    $randomSite = array_rand(array_flip($sites), 1);
    header("Location: $randomSite");
    ?>
    
    Code (markup):
     
    organicCyborg, Oct 17, 2009 IP
  3. Alpha13

    Alpha13 Active Member

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Thanks, how would I load that?
     
    Alpha13, Oct 18, 2009 IP
  4. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #4
    JAY6390, Oct 18, 2009 IP