You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
395 B
17 lines
395 B
<?php
|
|
|
|
namespace utils;
|
|
|
|
class curl {
|
|
|
|
public static function save($site, $file) {
|
|
if (! is_string_found($site, '://')) {
|
|
$site = 'https://' . $site;
|
|
}
|
|
|
|
exec(\neato::get_user_bin . 'curl ' . safe_cmd($site) . ' -o ' . safe_cmd($file), $output, $exit_code);
|
|
check_for_error($exit_code, "Unable to curl download from: {$site}");
|
|
return $exit_code;
|
|
}
|
|
|
|
} |