Check for valid downloaded LotW status report and report errors

appropriately
This commit is contained in:
phl0
2023-04-11 23:19:32 +02:00
parent 9d76681c05
commit bf4ffe47cd

View File

@@ -650,6 +650,9 @@ class Lotw extends CI_Controller {
return "Temporary download directory ".dirname($file)." is not writable. Aborting!";
}
file_put_contents($file, file_get_contents($lotw_url));
if (file_get_contents($file, false, null, 0, 39) != "ARRL Logbook of the World Status Report") {
return "LotW downloading failed either due to it being down or incorrect logins.";
}
ini_set('memory_limit', '-1');
$results = $this->loadFromFile($file, false);