I\'ve been looking all over the place for the last two days and trying everything and still can\'t get anything to work. I feel like this should be a relatively simple thin
$url = 'http://www.example.com/a-large-file.zip';
$path = '/path/to/a-large-file.zip';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
file_put_contents($path, $data);
it uses curl
$url is the file url
$path is where and the name to save the file
i hope it works
file_put_contents expects a filename, not a directory name.