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
All checks were successful
Website Sync / website-sync (push) Successful in 4s
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user