I am trying to create a PHP code that will execute once every 24 hours. The current CMS that I am using supports this, and it works correctly, whereas, I want to make it a little more complicated.
For one hour, every day, I want a code to execute, which will give special permissions to my users during this one hour.
Once the hour is up, I would like it to revert the changes, taking away the permissions. The users would then need to wait until the next day, when the hour is back.
For example:
<?php
if (!defined('UBER') || !UBER)
{
exit;
}
dbquery("UPDATE catalog_pages SET visible = '1' WHERE id='91'");
$core->Mus('update_catalogue');
?>
This code executes once every 24 hours, and works fine. It updates the catalogue setting a page to be visible to everyone. I am only stuck on how to make it disappear after the hour is up.
Lets say that the hour is 4.00am to 5.00am.
How would I make the page disappear after 5.00am using a PHP code?
Thanks in advance.
or in the query