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

redirect 2 affiliate

Discussion in 'Black Hat SEO' started by gurispopis, Apr 7, 2009.

  1. gurispopis

    gurispopis BANNED BANNED

    Joined:
    Aug 21, 2007
    Messages:
    136
    Likes Received:
    312
    hi,

    I'm using a code to redirect a page my affiliate link, but I would use 2 links affiliates.
    ie the first person who enters it redirects the affiliate 1
    what else comes in and redirected to affiliate 2
    go forth and rotating.
    How can I make this code:

    example
    Code:
    <html>
    <header>
    <META HTTP-EQUIV="Refresh" content="0; url=http://www.affiliate1.com">
    </header>
    </html>
    
    idea is:

    my web redirect:

    1° visitor: affiliate1
    2° visitor: affiliate2
    3° visitor: affiliate1
    4° visitor: affiliate2

    so on ...

    help


    thanks
     
  2. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,882
    Likes Received:
    1,932
    Something like this:
    PHP:
    <?php
    $RANDOMNO 
    rand(0,2);

    if 
    $RANDOMNO "1"{
    header ("location:http://site1.com");
    }
    else
    {
    header ("location:http://site2.com");
    }
    ?>
    That's probably completely wrong, I'm falling asleep here lol.
     
  3. gurispopis

    gurispopis BANNED BANNED

    Joined:
    Aug 21, 2007
    Messages:
    136
    Likes Received:
    312
    hi gimme4free,

    the code does not work, someone else can help me?

    greetings.
     
  4. freqout

    freqout Regular Member

    Joined:
    Dec 1, 2008
    Messages:
    494
    Likes Received:
    81
    Occupation:
    Security Engineer
    Location:
    San Francisco bay area
    Do you have php installed? You wont be able to do this in straight javascript, and you should ensure your server has PHP support and you have access to it.
     
  5. gurispopis

    gurispopis BANNED BANNED

    Joined:
    Aug 21, 2007
    Messages:
    136
    Likes Received:
    312
    I do not have php installed.
    simply counting the domain purchased goddady not have a hosting.

    greetings.