I only want to make the chat room available during a single period of a few hours each week. So, I have two different versions of my index.php file. The only difference is:
ON version:
//$params['islocked'] = false;
OFF version:
//$params['islocked'] = true;
//$params['lockurl'] = 'http://{WEBSITE}/chat-not-available.html';
During most of the week, the OFF version resides in index.php Then, at the start of the period (using a cron job), I simply copy the ON version from a temporarily location into index.php. And, at the end of the period (using a different cron job), I simply copy the OFF version back to index.php.
However, for the parameters to be updated properly, rehashing is required. Obviously, I can't do an automated rehash once the chat is locked.
I have read the suggestions at: http://www.phpfreechat.net/rehash but have some questions... How would you go about using the 'die' command in this instance? My goal is to prevent problems that may happen with the manual rehashing (by deleting the 'cache' and 'chat' folders with another cron job (or consolidated script file).
Thanks!
Note: Using PHPFreeChat version 1.6