help! Need php rotator site script

Discussion in 'Black Hat SEO Tools' started by jdubinc, Nov 19, 2010.

  1. jdubinc

    jdubinc Newbie

    Joined:
    Jul 9, 2010
    Messages:
    12
    Likes Received:
    0
    Occupation:
    Business Owner
    Location:
    Lexington, KY
    I am a noob lol... I want to make my sites rotate so when you go to site A/rotate.php it will guide you to either B, C, or D...

    So I Want mulitple rotations... I've tried a few things with little success.

    help!
     
  2. Dshah

    Dshah Newbie

    Joined:
    Dec 2, 2009
    Messages:
    46
    Likes Received:
    35
    if you are familiar with php use array_rand function
    See first example here
    http://php.net/manual/en/function.array-rand.php

    this how it will work ;) not tested but it should you can add as many sites you wants.
    Code:
    <?php
    srand((float) microtime() * 10000000);
    $input = array("http://www.firstsite.com", 
    				"http://www.secondtsite.com", 
    				"http://www.thirdsite.come"
    				);
    $rand_keys = array_rand($input, 2);
    $link = $input[$rand_keys[0]] ;
    
    header("Location: $link");
    ?>
    
     
    Last edited: Nov 19, 2010
  3. PEBAL

    PEBAL Newbie

    Joined:
    Jul 21, 2010
    Messages:
    35
    Likes Received:
    11
    Do you own the sites/pages you want to rotate amongst? If so, you could use Google's Website Optimizer. This will rotate and track conversions/actions.