View Single Post
Old 01-03-2005, 03:04 PM  
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
random.php
-----------------------------------------------
<?
$delim = "\n";
$cryfile = "galleries.txt";
$fp = fopen($cryfile, "r");
$contents = fread($fp, filesize($cryfile));
$cry_arr = explode($delim,$contents);
fclose($fp);
srand((double)microtime()*1000000);
$cry_index = (rand(1, sizeof($cry_arr)) - 1);
$herecry = $cry_arr[$cry_index];
echo $herecry;
?>
-----------------------------------------------

galleries.txt
-----------------------------------------------
<a href="gallery1.url">Gallery 1 Description</a>
<a href="gallery2.url">Gallery 2 Description</a>
<a href="gallery3.url">Gallery 3 Description</a>
etc...
-----------------------------------------------

Then just call them:

php
<? include ("random.php"); ?>
ssh
<!--#include virtual="random.php"-->

or try http://www.gallerybooster.com

or see sig for Gallery Admin
Not free, but few great scripts are
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote