![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Mar 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Our site offers streaming audio on Thursday evening (7:30 to 8:30) and on Sunday morning (8:30 to 1:30p). How can I use PHP to direct the visitor to the audio streaming link only during these times. At all other times, I want a message that indicates when the streaming is available.
Thanks in advance for your suggestions! Desi
|
|
|
|
|
|
PM User | #2 |
|
New Coder ![]() Join Date: Jun 2002
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
You might try something like this:
Code:
<?php
$day = date("D"); //returns "Mon" "Tue"
$time = date("Hi"); //returns HoursMinutes
if( ($day == "Thu" && $time >= "1930" && $time < "2030") ||
($day == "Sun" && $time >= "0830" && $time < "1330") )
{
header("Location: REDIRECT URL");
exit;
}
?>
~evlich |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|