public function createLastChecked() { $fh = fopen(DEFAULT_LAST_CHECKED_FILENAME, 'w+'); $today = json_encode(strtotime('today -1 day')); fwrite($fh, $today); fclose($fh); return $today; }