Looking for a simple banner script PHP to fit into vbulletin

Discussion in 'PHP' started by mattonline, Jul 19, 2010.

  1. #1
    Okay my forum is Entrepreneur////Forum//co./uk..

    And i'm looking for a very simple banner script where it will call images from a folder (i know theres loads of these) but i cannot find one which works on my site.
     
    mattonline, Jul 19, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Make life easier for yourself. Sign up to the hosted service at OpenX, create your "zone" then load those images as banner. They give you the code to place in your template (I recommend the iframe option) and you have the flexibility to replace with their "market" or adsense in the future. They'll also auto-refresh if you want.

    You won't regret the small amount of effort in setting up.
     
    sarahk, Jul 20, 2010 IP
  3. bencummins

    bencummins Peon

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you needing to create links from them? if not a really simple bit of code is..

    <?
    	$path = "banners/";
    
    	$files= glob($path."/*.jpg");
    
    
    	$file = $files[rand(0,count($files)-1)];
    
    ?>
    <img src="<?=$file;?>">
    PHP:
     
    bencummins, Jul 20, 2010 IP