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)
-   -   CGI script for random gallery? (https://gfy.com/showthread.php?t=77648)

deleteduser 09-17-2002 11:36 AM

CGI script for random gallery?
 
Hello Guys,

I need a CGI script that opens a random URL from a txt file.

example:
amateur.cgi => random URL from amateur.txt => gallery URL opens

anyone has some stuff like this?

thanks my fellow country men! :glugglug

ldinternet 09-17-2002 11:38 AM

I'll give you PHP...

-=HUNGRYMAN=- 09-17-2002 11:38 AM

Winston Churchill is a porn peddlar ??? :eek7

deleteduser 09-17-2002 11:43 AM

i'd prefer CGI, anyone CGI? if not, PHP is fine, too =)

ldinternet 09-17-2002 11:45 AM

Here is the PHP.

Code:

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

links.txt = list of links in a text file, one on each line.

ldinternet 09-17-2002 11:47 AM

For fucks sake.

Code:

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

links.txt = list of links in a text file, one on each line.

Just delete the spaces before or after each question mark.

deleteduser 09-17-2002 10:06 PM

thanks man!

if nobody comes up with an CGI i will use this one =)

playa 09-17-2002 10:46 PM

#!/usr/bin/perl

#This is a text file containing all your trade partners
################################################## ############################
$trade = "database.txt";


# Done
################################################## ############################

open (LINKS, "$trade");

srand();
$nlines=@file=<LINKS>;
print "Location: $file[int rand $nlines]\n\n";

close (LINKS);

exit;



be sure to grab my free hosted sponser galleries
http://www.playascash.com/hosted.htm :)


All times are GMT -7. The time now is 08:35 AM.

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