I'd like a different web page to automatically be displayed for each day of the week i.e similar to this websites schedule http://www.absoluteradio.co.uk/djs_shows鈥?/a> ...which shows a different schedule depending on what day it is ...is there some sort of script I can use to do this?Can I change web page based on day of the week?I know of a way to do it with PHP.
$date = time();
$day = date(%26quot;l%26quot;, $date); // That's a lowercase L
switch($day){
case %26quot;Sunday%26quot;:
include('./sunday.php');
break;
case %26quot;Monday%26quot;:
include('./monday.php');
break;
...
case %26quot;Saturday%26quot;:
include('./saturday.php);
break;
default:
include('./unknown.php');
break;
}
Can I change web page based on day of the week?You would have to use a dynamic PHP page, you could either do this as a redirect, or set up PHP to display the info differently depending on the day of the week.Can I change web page based on day of the week?Take a look at Javascript. You'll have to experiment a bit, but you should be able to set up a counting variable that is tied to the day and which will trigger a loop which will re-write your pages HTML. You might even be able to find a free script that does this in Yahoo YUI.