I had the same problem as you. I am creating a site that is very similar to yours, also using PHP to enable and disable page elements before and after airtime. Your solution seemed promising, but in the end I was unhappy with using pure Javascript to reload the page. Javascript gets time from the client machine, while PHP gets it from the server, and even a small difference between them can destroy the whole system. (for example, a page might refresh 30 seconds before PHP turns on the buttons, leading some viewers to assume that all this does not work.)
I solved the problem using PHP to tell Javascript functions what time it was happening and it works like a charm. The only problem is that it works every day, and not just on one day of the week, but it does not bother me - users will have no reason to view the page except for the broadcast day.
That's all you need - I put this right after the <body> :
<script type="text/javascript"> setTimeout(function() { window.location.reload(true); }, 1000*<?php $then = mktime(15,00,0); $tomorrow = mktime(15, 00, 0, date("m") , date("d")+1); $now = time(); if ($now > $then) {echo $tomorrow - $now;} else {echo $then - $now;}?>); </script>
Chris source share