Home >Backend Development >PHP Tutorial >PHP collection program for other server files_PHP tutorial
php tutorial collection of other server file programs
*/
header("pragma:no-cachern");
header("cache-control:no-cachern");
header( "expires:0rn");
$rmurl = "http://www.bkjia.com/demodata.txt";
$infostring = file_get_contents($rmurl) or die("Connect to remote URL Failed! ");
$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);