Update compile_database.php

This commit is contained in:
jakani24
2024-02-17 15:56:46 +01:00
parent 50972b6d59
commit 1e4deb7300

View File

@@ -15,7 +15,7 @@ function sort_hashesh($inputFile) {
$prefix = substr($word, 0, 2); $prefix = substr($word, 0, 2);
// Create the filename for the corresponding file // Create the filename for the corresponding file
$filename = $prefix . ".txt"; $filename = $prefix . ".jdbf";
// Open or create the file for writing // Open or create the file for writing
$fileHandle = fopen($filename, "a"); $fileHandle = fopen($filename, "a");
@@ -43,11 +43,11 @@ function download_files(){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$fileContents = curl_exec($ch); $fileContents = curl_exec($ch);
file_put_contents("/var/www/html/database_srv/$fileNumber.md5", $fileContents); file_put_contents("/var/www/html/database_srv/$fileNumber.md5", $fileContents);
sort_hashes("/var/www/html/database_srv/$fileNumber.md5");
} }
} }
download_files(); download_files();
$inputFile = "input.txt";
//sortWordsIntoFiles($inputFile);
?> ?>