×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: jesse griffin
Added: Jan 27, 2016 3:40 AM
Views: 19
create last checked - file based cache system
  1.     public function createLastChecked()
  2.     {
  3.         $fh = fopen(DEFAULT_LAST_CHECKED_FILENAME, 'w+');
  4.         $today = json_encode(strtotime('today -1 day'));
  5.         fwrite($fh, $today);
  6.         fclose($fh);
  7.         return $today;
  8.     }
  9.