Small fixes to improve memory performance, temporary code deletion and small typo in img file location.
All checks were successful
Website Sync / website-sync (push) Successful in 4s

This commit is contained in:
2026-03-16 17:10:25 -03:00
parent eeefee56ac
commit 775641dc36
4 changed files with 12 additions and 3 deletions

View File

@@ -19,6 +19,8 @@ function getFile(array $source){
curl_close($curl);
}
unset($selected_source,$curl);
return $file;
}
@@ -29,6 +31,7 @@ function extractString(string $string,string $start_pattern, string $end_pattern
$extracted_string = substr($string, $start_pos, $end_pos - $start_pos);
unset($start_pos,$end_pos);
return $extracted_string;
}
@@ -36,5 +39,7 @@ function extractString(string $string,string $start_pattern, string $end_pattern
function scrapeWebsiteSites(array $source,string $start_pattern, string $end_pattern) {
$script = getFile($source);
$websites = extractString($script,$start_pattern,$end_pattern);
unset($script);
return $websites;
}