![]() |
![]() |
![]() |
||||
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: Mar 2003
Posts: 675
|
a simple script needed
can anyone point me to a script, or help me figure out what Im doing wrong.
I need a "random gallery" script that will do the following. I enter in a url such as: http://www.domainname.com/galleries.php?=123456 now the galleries.php file will access another file called galls. There will be 20 galleries in there. It will pick a random gallery and add the "123456" code above to a variable in the file. the galls file will be setup like http://www.domain1.com/linkcode=refer code http://www.domain2.com/linkcode=refer code http://www.domain3.com/linkcode=refer code etc so when I enter in http://www.domainname.com/galleries.php?=123456 it will go to the galls file, and replace the "refer code" with the 123456 which is at the end of http://www.domainname.com/galleries.php?=123456 so if I change 123456 to 444444 it will change the refer code on the output of the random gallery. Im using a php based script, but i'll use cgi if someone can show me the way. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
cut n paste from elsewhere.. I'm looking into this as well to see if there is a better way.
gallery.php contain the next script to select an random link from gallery.txt $fileName = "gallery.txt"; mt_srand( (double) microtime() * 1000000 ); $a = file($fileName); $randNum = mt_rand( 0, sizeof($a)-1 ); header( "Location: ". $a[$randNum] ); ?> gallery.txt contain for example next 3 links: site3.com/linkgallery1.html site3.com/linkgallery2.html site3.com/linkgallery3.html |
![]() |
![]() ![]() ![]() ![]() ![]() |