View Single Post
Old 2021-08-24, 06:53 AM   #2
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,915
Send a message via ICQ to Greenguy
I actually know this one!!! (not that I wrote it lol)

Code:
<?php
$file = "/home/domain.com/public_html/textfile.txt";
$banners = file($file);
srand((float) microtime() * 1235689);
$selected = array_rand($banners);
$SelBanner = trim($banners[$selected]);
if ($SelBanner=="") {
$SelBanner = trim($banners[0]);
};
echo $SelBanner;
?>
That will pull 1 line from the text file & insert it on the page. I've used it as a cheap banner rotator for years:
https://www.link-o-rama.com/greenguy/mlinks.htm
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote