you can also use fopen, such as:
<?php
$file = "http://www.domain.com/dir/file.zip"; // the dest file you want to download
$localPath = "c:/download"; // where the downloaded files save
$filename = basename($file); //get filename
$filestream = 1024; // bytes
// open remote file handle
$fp1 = fopen($file,"rb");
//create local file
$fp2 = fopen("$localPath/$filename","ab");
//read remote file and write data to your local file
while (!feof($fp1)) {
$output = fread($fp1,$filestream);
fputs($fp2,$output);
}
//close file handles
fclose($fp1);
fclose($fp2);
echo "job finished!";
?>
NOTICE: you must ensure your "allow_url_fopen = On" at your php.ini