您的位置:首页 > 编程语言 > PHP开发

php 采集其它服务器文件程序

2014-01-08 15:54 232 查看
php教程 采集其它服务器文件程序

*/

header("pragma:no-cachern");

  header("cache-control:no-cachern");

  header("expires:0rn");

  $rmurl = "http://www.php100.com/demodata.txt";

  

 $infostring = file_get_contents($rmurl) or die("连接远程网址失败!");

 $infos = split(‘,’,$infostring);

 $maxnum  =count($infos);

  $rmurl = trim($infos[rand(0,$maxnum-1)]);

  

  $zipbin = file_get_contents($rmurl);

 $fp = fopen(dirname(__file__).’/dedev56demo.zip’,'w’);

 fwrite($fp,$zipbin);

 unset($zipbin);

 fclose($fp);

转载请注明:爱分享 » php
采集其它服务器文件程序
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息