Skip to content

Commit

Permalink
Added log files
Browse files Browse the repository at this point in the history
	modified:   web/setups/synccorn.php
  • Loading branch information
Aman Skywalker committed Aug 27, 2017
1 parent 101fb62 commit 40a018f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions web/setups/synccorn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,18 @@
include 'sync.php';
}

$tempfile = tmpfile();
$line = date("Y-m-d H:i:s") . "Corn Hit";
fwrite($tempfile, $line);

$configfile = fopen("syscron.log", "a+");

rewind($tempfile);

while (($buffer=fgets($tempfile))!== false) {
fwrite($configfile,$buffer);
}

fclose($tempfile); // remove tempfile

?>

0 comments on commit 40a018f

Please sign in to comment.