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

Affiliate url rotator help

Discussion in 'PHP & Perl' started by dumdum4gumgum, Jul 26, 2009.

  1. dumdum4gumgum

    dumdum4gumgum Power Member

    Joined:
    Oct 16, 2008
    Messages:
    590
    Likes Received:
    343
    Occupation:
    cet, networking,grool,c++
    Location:
    In my world
    Home Page:
    I was wondering if someone could take this code and a url rotator to it thank you for the help

    Code:
    </head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <frameset rows="20,*" frameborder="0" border="0" framespacing="0">
    <frame src="topnav52308.htm" name="top" marginheight=0 marginwidth=0 leftmargin=1>
    <frame src="www.YOURDOMAIN.COM" name="main" marginheight=0 marginwidth=0 leftmargin=1>
    </frameset>
    <NOFRAMES>
    </html>
     
  2. eskimo

    eskimo Regular Member

    Joined:
    Dec 1, 2008
    Messages:
    474
    Likes Received:
    178
    what do you mean? like to randomly change which affiliate link is displayed?
    if so, try this:

    PHP:
    <?php

    $randomnum 
    rand(1,10);

    switch (
    $randomnum)
    {
    case 
    1:
      echo 
    "www.affiliatelink1.com";
      break;
    case 
    2:
      echo 
    "www.affiliatelink2.com";
      break;
    case 
    3:
      echo 
    "www.affiliatelink3.com";
      break;

      
    etc...
    }
    ?>
     
    • Thanks Thanks x 1