Cool banner/text ad rotator for CJ.com

Discussion in 'Commission Junction' started by vitalbusiness, Oct 21, 2008.

  1. #1
    I've been using this rotator for a couple of months now and really like it. Your pages have to be in .php for it to work.


    Put your affiliate links (as many as you like) like so and then save them as a text file banner_ads.txt Make sure you have ~ between the links:


    <a href="http://www.kqzyfj.com/click-XXXXXXX-XXXXXXX" target="_top">
    <img src="http://www.kdxcjw.com/click-XXXXXXX-XXXXXXX" alt="" border="0"/></a>

    ~

    <a href="http://www.kqzyfj.com/click-XXXXXXX-XXXXXXX" target="_top">
    <img src="http://www.kdxcjw.com/click-XXXXXXX-XXXXXXX" alt="" border="0"/></a>

    ~

    <a href="http://www.kqzyfj.com/click-XXXXXXX-XXXXXXX" target="_top">
    <img src="http://www.kdxcjw.com/click-XXXXXXX-XXXXXXX" alt="" border="0"/></a>

    ~

    <a href="http://www.kqzyfj.com/click-XXXXXXX-XXXXXXX" target="_top">
    <img src="http://www.kdxcjw.com/click-XXXXXXX-XXXXXXX" alt="" border="0"/></a>


    Then place this code anywhere on your website where you want CJ ads to show up:


    <?php
    $fcontents = join ('', file ('banner_ads.txt'));
    $s_con = split("~",$fcontents);

    $banner_no = rand(0,(count($s_con)-1));
    echo $s_con[$banner_no];
    ?>


    The code will rotate anything AdSense ads, Javascript, plain text.
     
    vitalbusiness, Oct 21, 2008 IP
  2. drkwrld

    drkwrld Active Member

    Messages:
    479
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    78
    #2
    can you install this on blogger?
     
    drkwrld, Oct 22, 2008 IP
  3. vitalbusiness

    vitalbusiness Peon

    Messages:
    882
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3

    I don't think so, since it's not possible to save files to Blogger.

    I have not used Blogger for a while, but when I used it a year ago or so, something like that was not possible.
     
    vitalbusiness, Oct 23, 2008 IP
  4. SMcGuire45

    SMcGuire45 Peon

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    NeverBlue Ads has an awesome rotating banners app...just add the script to your site and your all set. You can have as many as you want, and control how often each one shows by controlling the weight.
     
    SMcGuire45, Oct 23, 2008 IP
  5. proxy4u

    proxy4u Peon

    Messages:
    429
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That is really useful. Thanks
     
    proxy4u, Oct 23, 2008 IP
  6. SMcGuire45

    SMcGuire45 Peon

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Sure....you bet! Let me know if you have any questions about it.
     
    SMcGuire45, Oct 23, 2008 IP
  7. sweetrock82

    sweetrock82 Member

    Messages:
    612
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #7
    If you find some thing like this for blogger.. please post here.
    thanx
     
    sweetrock82, Oct 25, 2008 IP
  8. oregonthunder2

    oregonthunder2 Active Member

    Messages:
    360
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    78
    #8
    This is great. I might add though, it only works if the .txt file in the same folder as your page.


    For example: if your page is http://ww.examle.com/folder44/example.php

    you would need to put the text file under folder44.

    Also i found out this works on WordPress Sites
     
    oregonthunder2, Oct 25, 2008 IP