View Single Post
Old 11-23-2009, 05:33 PM  
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
Quote:
Originally Posted by quantum-x View Post
Quick and dirty way to do it:
Code:
<?
$urls = file('URLS.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
$url = array_shift($urls);
array_push($urls,$url);
file_put_contents('URLS.txt',implode("\r\n",$urls));

header('Location:'.$url);
?>
Will work. Untested, don't ask for me to fix it if it doesn't kick - pay woj instead.
Yup, that would work.
A real solution would be to use a db or even xml file, but quantum-x has a solution that will work quite well
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote