Google ad in banner rotation?

Discussion in 'AdSense' started by kastro_316, Jun 17, 2006.

  1. #1
    Hey guys,

    Ok, on my site www.sexyornot.us I have a banner rotation system, where I can upload up to 5 banners and they will be rotated. Now, Is there anyway I can put a google ad 468x60 in the rotation some how???

    THanks
     
    kastro_316, Jun 17, 2006 IP
  2. IBBOY

    IBBOY Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Good question. I was thinking about that too.

    Anyone?
     
    IBBOY, Jun 19, 2006 IP
  3. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Use this code

    PHP Code place this code where you want the ad to show at.
    
    <?php
    
    $fcontents = join ('', file ('/468x60.txt'));
    $s_con = split("~",$fcontents);
    
    $banner_no = rand(0,(count($s_con)-1));
    echo $s_con[$banner_no];
    ?>
    
    Code (markup):

    Then make a .txt file called 468x60.txt


    468x60.txt
    
    Ad code here
    
    ~ <---- use this to seperate every add
    
    Another Ad code
    
    Code (markup):
     
    MediaHustler, Jun 19, 2006 IP