From 1e4deb73006ba792be36360244cebcfdcd3af52c Mon Sep 17 00:00:00 2001 From: jakani24 Date: Sat, 17 Feb 2024 15:56:46 +0100 Subject: [PATCH] Update compile_database.php --- .../cyberhex-code/api/php/database/compile_database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/cyberhex-code/api/php/database/compile_database.php b/src/server/cyberhex-code/api/php/database/compile_database.php index 21f4a96..a6ff9ef 100644 --- a/src/server/cyberhex-code/api/php/database/compile_database.php +++ b/src/server/cyberhex-code/api/php/database/compile_database.php @@ -15,7 +15,7 @@ function sort_hashesh($inputFile) { $prefix = substr($word, 0, 2); // Create the filename for the corresponding file - $filename = $prefix . ".txt"; + $filename = $prefix . ".jdbf"; // Open or create the file for writing $fileHandle = fopen($filename, "a"); @@ -43,11 +43,11 @@ function download_files(){ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $fileContents = curl_exec($ch); file_put_contents("/var/www/html/database_srv/$fileNumber.md5", $fileContents); + sort_hashes("/var/www/html/database_srv/$fileNumber.md5"); } } download_files(); -$inputFile = "input.txt"; -//sortWordsIntoFiles($inputFile); + ?>