1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Rotating Weblinks JavaScript Code

Discussion in 'JavaScript' started by SKULL, Apr 6, 2007.

  1. SKULL

    SKULL Prominent Member

    Messages:
    5,301
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    350
    Digital Goods:
    1
    #21

    so how should the hole code look as im confused with the last reply you posted :confused:
     
    SKULL, Apr 8, 2007 IP
  2. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Inside the box you should have:

    
    <?php
    $content = array();
    
    //Links go here
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 1</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 2</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 3</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 4</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 5</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 6</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 7</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 8</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 9</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 10</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 11</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 12</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 13</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 14</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 15</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 16</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 17</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 18</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 19</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 20</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 21</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 22</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 23</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 24</a>');
    array_push($content, '<a href="http://www.url-link.com">CLICK HERE 25</a>');
    
    //25 links loaded.
    
    for($i = 0; $i < 5; $i++)
    {
        echo $content[rand($i * 5, $i * 5 + 4)];
        echo "<br>";
    }
    echo '<a href="http://www.google.com">More Links</a>';
    
    ?>
    
    PHP:
    It seems right now you have
    echo $contents;
    PHP:
    which isnt right, but I don't know because I can't see your code.
     
    giraph, Apr 8, 2007 IP
  3. SKULL

    SKULL Prominent Member

    Messages:
    5,301
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    350
    Digital Goods:
    1
    #23
    Here is the code i have in the box at the moment that is not working

    <?php
    $content = array();
    //Links go here
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 1</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 2</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 3</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 4</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 5</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 6</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 7</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 8</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 9</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 10</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 11</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 12</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 13</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 14</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 15</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 16</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 17</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 18</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 19</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 20</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 21</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 22</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 23</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 24</a>');
    array_push($content, '<a href=\"http://www.url-link.com\">CLICK HERE 25</a>');
    //25 links loaded.
    for($i = 0; $i < 5; $i++)
    {    
    echo $content[rand($i * 5, $i * 5 + 4)];    
    echo "<br>";
    }
    echo '<a href="http://www.google.com">More Links</a>';
    ?>
    PHP:
     
    SKULL, Apr 8, 2007 IP
  4. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #24
    Well it's apparently not in the box, I can't help you much further without more information, sorry.
     
    giraph, Apr 8, 2007 IP
  5. SKULL

    SKULL Prominent Member

    Messages:
    5,301
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    350
    Digital Goods:
    1
    #25
    Ok well thanks for your help giraph and thanks for your time it was helpful.
     
    SKULL, Apr 9, 2007 IP