1<?php
2 $url = 'http://www.example.com/a-large-file.zip';
3 $path = '/path-to-file/a-large-file.zip';
4
5 $ch = curl_init($url);
6 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
7
8 $data = curl_exec($ch);
9
10 curl_close($ch);
11
12 file_put_contents($path, $data);
13?>
14