View Single Post
Old 12-13-2004, 06:46 PM  
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally posted by potter
PHP Code:
<?php
   $file 
"bannerlist.txt";
   
$banners file($file);
   
srand((float) microtime() * 1235689);
   
$selected array_rand($banners);
   
$SelBanner trim($banners[$selected]);
   if (
$SelBannerhahahaha"") {
       
$SelBanner trim($banners[0]);
   };
   echo 
$SelBanner;
?>
This will pull a single line from the file "bannerlist.txt" and place it where the php code is located in your site.

So just make each line of the text file, an image or href tag and your all set.
so, with this i can rotate banners, and each banner could possibly have a seperate link?

so i can rotate sponsors and shit?
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote