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

Displaying a random page within my site?

Discussion in 'Cloaking and Content Generators' started by tywebb, Mar 26, 2009.

  1. tywebb

    tywebb Regular Member

    Joined:
    Dec 8, 2008
    Messages:
    226
    Likes Received:
    144
    Location:
    In the fairway
    Hello all,

    I have a lil issue I have run across with a method I am using. I am generating email/zip submits through incentivation but I dont want to send too many leads to one CPA company. I dont think they would be too happy about the way I generate the leads. If I only send a few a day I figure id have a better chance of staying under the radar.

    I need a way to rotate the leads that I am offering from diff companies.

    Example:

    page1.htm is my landing page, this is where I offer my incentive. When the user clicks to go to page 2 where the offer is this is page2.htm.

    Now, when the user click the link to page2.htm I want it to load one of many pages that I have in a list say {page2a.htm, page2b.htm, page2c.htm, etc}. This would change in seqential order or random by random selection.

    Im sure there is a way to do it. Can anyone help point me in the right direction?

    Thanks!
     
  2. Matter

    Matter Newbie

    Joined:
    Mar 16, 2009
    Messages:
    28
    Likes Received:
    10
    It's easy if you use dynamic pages. I can't use code tags for some weird reason, so I attached a zip with an example of how this could be done in PHP. If you use all static html, you probably need some kind of javascript magic to do it, but I'm a JS-tard and can't help you there.
     

    Attached Files:

  3. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    With php you can print a random page for the user to go to.
    I don't have FTP access to my site to test code, but it would be something like this:
    PHP:
    <?php
    //Pages to randomize access to:
    $targets = array("./page2a.htm""./page2b.htm""./page2c.htm""./page.2d.htm");
    //Pick random target from list
    $finaltarg array_rand($targets1);
    //Print link to go to:
    echo "<a href='$finaltarg'>Continue to offer</a>";
    ?>
    (Forgive any errors--I can help fix them later if there are any.)