<?php
$content = file_get_contents('http://www.google.com/index.html');
echo $content;
$handle = fopen('test.txt','w');
fwrite($handle,$content);
?>
$content = file_get_contents('http://www.google.com/index.html');
echo $content;
$handle = fopen('test.txt','w');
fwrite($handle,$content);
?>
$dfp = fopen($filename, 'w');
while($data = fread($fp, 1024)){
fwrite($dfp, $data);
}前提是你的php容许远程fopen.
如果不行,也可以使用curl。