摘要 腾兴网为您分享:php 自动下载远程服务器文件,桌面时钟,银联商务,小番茄,喜马拉雅等软件知识,以及中山安全,司机之家,四川金穗服务,的语音合成,包头交警,thor过滤器,魔术教学视频简单,怒熊,益盟手机决策版,摄像头检测器,易操盘,看代码软件,笔记本cpu降温软件,点云处理软件,犀牛软件学习等软件it资讯,欢迎关注腾兴网。php 自动下载远程服务器文件 form method=post input name=url size=50 / input name=submit type=submit / /form ?php // maximum execution time in seconds set_time_limit (24 * 60 * 60); if (!isset($_POST['submit'])) die(); // folder to...
php 自动下载远程服务器文件
< ?php
// maximum execution time in seconds
set_time_limit (24 * 60 * 60);
if (!isset($_POST['submit'])) die();
// folder to save downloaded files to. must end with slash
$destination_folder = 'temp/';
$url = $_POST['url'];
$newfname = $destination_folder . basename($url);
$file = fopen ($url, "rb");
if ($file) {
$newf = fopen ($newfname, "wb");
if ($newf)
while(!feof($file)) {
fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
}
}
if ($file) {
fclose($file);
}
if ($newf) {
fclose($newf);
}
?>
相关推荐