View Single Post
Old 04-22-2003, 11:29 PM  
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
Quote:
Originally posted by ldinternet
If you want to put all galleries in a database, then link to the database and display a random gallery, then try this:

Create amateur.php with this code

<font size=3>
PHP Code:
<?php
$fileName 
"amateur.txt";
mt_srand( (double) microtime() * 1000000 );
$a file($fileName);
$randNum mt_rand0sizeof($a)-);
header"Location: "$a[$randNum] );
?>
</font>

Then create amateur.txt containing 1 gallery URL per line.

Upload both files and link to amateur.php
It will display a random gallery from amateur.txt
ldinternet, your script is great but how can i make to same surfer to not be redirected to same galleries more that 1 time?
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote