mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
🔃 Sync Hub v0.7.2
This commit is contained in:
@@ -35,10 +35,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
|
||||
// Generate a unique file path to avoid overwriting existing files
|
||||
$files = glob("{$storage_path}/last_result.encoded.{$node_name}.*.log");
|
||||
$files = glob("{$storage_path}/last_result.{encoded,decoded}.{$node_name}.*.log", GLOB_BRACE);
|
||||
$file_count = count($files) + 1;
|
||||
$file_path = "{$storage_path}/last_result.encoded.{$node_name}.{$file_count}.log";
|
||||
|
||||
|
||||
// Save the decoded data to the file
|
||||
file_put_contents($file_path, $data);
|
||||
http_response_code(200);
|
||||
|
||||
Reference in New Issue
Block a user