View Single Post
Old 12-13-2004, 06:44 PM  
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
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.
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote