Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-17-2002, 11:36 AM   #1
deleteduser
Confirmed User
 
Join Date: Sep 2001
Location: Europe
Posts: 2,218
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!
deleteduser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 11:38 AM   #2
ldinternet
Confirmed User
 
Join Date: Apr 2001
Posts: 8,245
I'll give you PHP...
ldinternet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 11:38 AM   #3
-=HUNGRYMAN=-
Confirmed User
 
Join Date: Jun 2001
Location: Between your mamma's legs
Posts: 4,753
Winston Churchill is a porn peddlar ???
__________________
-=HUNGRYMAN=- is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 11:43 AM   #4
deleteduser
Confirmed User
 
Join Date: Sep 2001
Location: Europe
Posts: 2,218
i'd prefer CGI, anyone CGI? if not, PHP is fine, too =)
deleteduser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 11:45 AM   #5
ldinternet
Confirmed User
 
Join Date: Apr 2001
Posts: 8,245
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 11:47 AM   #6
ldinternet
Confirmed User
 
Join Date: Apr 2001
Posts: 8,245
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.
ldinternet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 10:06 PM   #7
deleteduser
Confirmed User
 
Join Date: Sep 2001
Location: Europe
Posts: 2,218
thanks man!

if nobody comes up with an CGI i will use this one =)
deleteduser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-17-2002, 10:46 PM   #8
playa
Confirmed User
 
Join Date: Feb 2001
Location: atlanta, GA
Posts: 6,432
#!/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
playa is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.