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 04-20-2003, 02:17 AM   #1
- Jesus Christ -
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
'lil PHP help.

Will this work...and is there a way to make the code cleaner/faster? Its going to be processed like a couple times a second.

Any input appreciated (cuz IM no programmer)
Its supposed to redirect but I don't even know if my header line is right.

PHP Code:
<?php
// Random URL From File
srand((double)microtime()*1000000);
$list=file("URLLIST.txt");
$url=rand(0count($list)-1);
header("Location: $url");
?>
__________________

Amen
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-20-2003, 03:38 AM   #2
Damian_Maxcash
So Fucking Banned
 
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
Heres a little script I use..... works like a dream

randomurl.zip
Damian_Maxcash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-20-2003, 07:39 AM   #3
cj-design
Confirmed User
 
Join Date: Apr 2003
Location: England
Posts: 378
Quote:
Originally posted by - Jesus Christ -
[B]Will this work...and is there a way to make the code cleaner/faster? Its going to be processed like a couple times a second...
It will work, but not sure what srand does in your script!
cj-design is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-20-2003, 07:51 AM   #4
jollyperv
Confirmed User
 
Industry Role:
Join Date: Nov 2001
Location: NYC
Posts: 3,927
Jesus Christ should know the answer.
jollyperv is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-20-2003, 10:02 AM   #5
OzKaNoz
Confirmed User
 
Join Date: Jan 2001
Location: Deep With In Your Mind
Posts: 1,834
Quote:
Originally posted by jollyperv
Jesus Christ should know the answer.
Damn you, that was what I was going to say.


Oz
__________________
Techie Media Web Hosting
OzKaNoz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-20-2003, 12:30 PM   #6
tical
Confirmed User
 
Join Date: Feb 2002
Location: Las Vegas
Posts: 6,504
Quote:
Originally posted by cj-design


It will work, but not sure what srand does in your script!
That seeds the random number generator... for a 'truly random' number
tical 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.