View Single Post
Old 11-08-2004, 02:16 PM  
Dynamix
G F Y not
 
Industry Role:
Join Date: Jan 2004
Location: MN
Posts: 2,910
Start numbering around 312 or so, that's the day of the year for today's date. 312 corresponds to Nov 8, 313 Nov 9, 314 Nov 10, etc. etc. until 0 again at Jan 1.

PHP SCRIPT
------------------------

PHP Code:
<?PHP
$lines 
file("urls.php");
$year date("z");
// Loop through our array, find the corresponding URL
foreach ($lines as $line) {
   
$arr split("\|"$line);
   if ((
$arr[0]) hahahaha $year) {
   
header("Location: ".$arr[1]);
   exit;
}
}
?>

SAMPLE URLS.PHP FILE
--------------------------------------
PHP Code:
312|[url]link.com[/url]
313|[url]link.com[/url]
314|[url]link.com[/url]
315|[url]link.com[/url]
316|[url]link.com[/url
__________________

TGPFactory Full TGP Design & Installation Services
ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com
See who I am at AdultWhosWho.com!

Last edited by Dynamix; 11-08-2004 at 02:17 PM..
Dynamix is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote