GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   the little random gallery script - here is the code (https://gfy.com/showthread.php?t=42939)

Lane 11-27-2001 12:04 PM

the little random gallery script - here is the code
 
i see a lot of people asking for this script on the boards.
here is the code for ya:


<?
mt_srand((float)microtime()*1000000);
$f=file("gallery.txt");
$u=trim($f[mt_rand(0,sizeof($f)-1)]);
header("Location: $u");
?>

save this file as a php file (no shit http://bbs.gofuckyourself.net/board/biggrin.gif).
the file format for gallery.txt needs to be one url per line with no empty lines, on a flat txt file.
you should upload both files in ascii mode if you are running Windoze.
its the least cpu-resource-consuming version that i could think of at this second http://bbs.gofuckyourself.net/board/smile.gif

cheers
Lane

[This message has been edited by Lane (edited 11-27-2001).]

Ludedude 11-27-2001 12:39 PM

Hrm

------------------
Make 60% recurring with these Babes!
The Webmaster's Folder
The Midnight TGP2 Submitter

http://www.barefantasy.com/banners/linkup3.gif

Theo 11-27-2001 12:56 PM

great lane http://bbs.gofuckyourself.net/board/smile.gif
my version is the following

<?php
$RANDOM_URL_FILE = "pornstars.txt";
srand((double)microtime()*1000000);

if (file_exists($RANDOM_URL_FILE)) {
$arry = file($RANDOM_URL_FILE);
// En: load file.
// Fr: charge le fichier.

for($i = 0; $i < sizeof($arry) ; $i++) {
if (preg_match("/http:/", $arry[$i]))
$good_arry[$j++] = chop($arry[$i]);
# PHP 4.0 arry_push ($good_arry, $arry[$i]);
}
if ($good_arry) {
header("Location: ".$good_arry[rand(0, sizeof($good_arry) -1)]);
} else {
echo "error no good URL";
}
} else {
echo "error: can't open $RANDOM_URL_FILE file";
}
?>

i guess your's is better since there's no way i won't have the text file up


All times are GMT -7. The time now is 06:31 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123