diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 8a1e55a68..798d08a02 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -765,7 +765,7 @@ class Lotw extends CI_Controller { break; } continue; - } else if(str_contains($content,"Username/password incorrect")) { + } else if(str_contains(substr($content,0 , 2000),"Username/password incorrect")) { $result = "LoTW download failed for user ".$user->user_lotw_name.": Username/password incorrect"; log_message('error', 'LoTW download failed for user '.$user->user_name.': Username/password incorrect'); if ($this->Lotw_model->remove_lotw_credentials($user->user_id)) { @@ -774,6 +774,10 @@ class Lotw extends CI_Controller { log_message('error', 'Deleting LoTW credentials for user '.$user->user_name.' failed'); } continue; + } else if (str_contains(substr($content, 0, 2000),"Page Request Limit!")) { + $result = "LoTW download hit a rate limit for user ".$user->user_lotw_name; + log_message('error', 'LoTW download hit a rate limit for user '.$user->user_name); + continue; } file_put_contents($file, $content); if (file_get_contents($file, false, null, 0, 39) != "ARRL Logbook of the World Status Report") {