<?php
$content = "";
$fp = fopen("http://file-to-download.com/a-file.zip", "rb");
if (!$fp)
die("Error opening file.");
while (!feof($fp))
$content .= fread($fp, 2048);
fclose($fp);
$fp=fopen("local-file-name.zip", "w");
fwrite($fp, $content);
fclose($fp);
?>文章標籤
全站熱搜
