$sunset_ms) { header("Location: where_to_locate_if_its_friday.php"); } } if($day == "Saturday") { $currently_time = (int)microtime(true); $one_hour_in_ms = 3600000; $sunset_ms = $greenbrae_sunset; if($currently_time > $sunset_ms) { // if its after sunset if(($sunset_ms+$one_hour_in_ms) < microtime()) { header("Location: where_to_locate_when_its_saturday"); } } } ?>


I need a PHP include file. When included in a page, this file will do the following: 1. Determine the day of week in California and the actual current time in California. 2. Determine the time of sunset in California (specific location will be provided) 3. If the day is Friday and the current actual time in California is after sunset, then redirect the user to a certain page. 4. If the day is Saturday and the current actual time in California is before one hour after sunset, then redirect the user to a certain page. 5. If the time is not either of the above, then do nothing whatsoever. ?>