PDA

View Full Version : Looking for some php code



jerricho
02-07-2006, 06:27 PM
Just looking for a code snippet to get me started. I've found a few examples but none of them are in depth enough for what I need.

I need to have an hourly content rotation.

Like

6:00a to 9:00a CST load page1.html
9:00a to 11:00a CST load page2.html

etc.

Any ideas?

Pixelcode
02-08-2006, 06:05 PM
You can use the date function:


$date = date("H:i");
if($date == "06:00"){
include("page1.html");
}elseif($date == "09:00"){
include("page2.html");
}

Tutorial - date function (http://www.pixelcode.co.uk/tutorials-PHP-8.htm)
:)