How to use cookie to rotate 10 clickbank ads?

Discussion in 'Affiliate Programs' started by evilSurfer, Apr 7, 2009.

  1. evilSurfer

    evilSurfer Newbie

    Joined:
    Apr 7, 2009
    Messages:
    1
    Likes Received:
    0
    I'm pretty new to this online marketing thing, I picked 10 clickbank products, find a rotator script on this forum, and put it up on a pay to surf website.

    My question is: how can I modify the script so it show the same user different product each time he click on my index page. I believe I need to use cookie, but not sure exactly how.

    Thank you very much for your help

    ======
    <head>
    <?php

    $offers = array(
    "mysite page1",
    "mysite page2",
    "mysite page3",
    "mysite page4",
    "mysite page5"
    );

    $referer = $_SERVER['HTTP_REFERER'];
    if($referer == "") {
    $url = $offers[rand(0, count($offers) - 1)];
    echo "<meta http-equiv='refresh' content='0;url=$url'>";
    }
    else
    {
    echo "<meta http-equiv='refresh' content='0;url=mysite'>";
    }
    ?>
    </head>