![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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! ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Apr 2001
Posts: 8,245
|
I'll give you PHP...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jun 2001
Location: Between your mamma's legs
Posts: 4,753
|
Winston Churchill is a porn peddlar ???
![]()
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Sep 2001
Location: Europe
Posts: 2,218
|
i'd prefer CGI, anyone CGI? if not, PHP is fine, too =)
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
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"); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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"); ? > Just delete the spaces before or after each question mark. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
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 =) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
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 ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |