$url = "http://www.baidu.com";
$contents = file_get_contents($url);
$file=fopen("E:/yang/web.doc",'w');
fwrite($file,$contents);
$contents = file_get_contents($url);
$file=fopen("E:/yang/web.doc",'w');
fwrite($file,$contents);
fclose($file);
就这么简单。