<?php class download { var $url;//远程文件地址 var $file_name = "hdwiki.zip";//下载来的文件名称 var $save_path = "./www.phpfensi.com";//下载到本地的文件路径 var $localfile;//下载到本地文件的路径和名称 var $warning;//警告信息 var $redown=0;//是否重新下载 /*初始化*/ function seturl($url) { if(!empty($url))$this->url = $url; } function setfilename($file_name) { if(!empty($file_name))$this->file_name = $file_name; } function setsavepath($save_path) { if(!empty($save_path))$this->save_path = $save_path; } function setredown($redown) { if(!empty($redown))$this->redown = $redown; }
With the rapid development and widespread application of computers, communications and information technology, human beings are entering the information society. By establishing networks, people around the world can freely and cheaply use other people's resources to achieve different geographical locations. , resource sharing at different times, that is, information sharing, information exchange is extremely convenient, so the network has achieved unprecedented development, and remote file transmission has also been widely used.
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
29 Jul 2016
: PHP download remote file class supports breakpoint resumption: simple usage method: copy the code as follows: $object = new httpdownload(); $object->set_byfile($file)%N#H#%;//server file name , including the path $object->filename = $filename;//Download the file name saved as $object->download(); 3. Source file: Copy the code as follows: <? class http
20 Jul 2016
PHP file download code (supports remote file download). PHP file download code (supports remote file download)/*Two of the three file download codes provided in this article support local server file downloads, and the other supports downloading on remote servers.
25 Jul 2016
PHP download remote file class that supports breakpoint resume download
21 Jul 2016
PHP download remote file class (supports breakpoint resume download). Easy to use: Copy the code as follows: $object = new httpdownload(); $object-set_byfile($file)%N#H#%;//Server file name, including path $object-filename = $filename;// Download another
21 Jul 2016
PHP downloads remote file classes (supports resumed downloads). PHP downloads remote file classes and supports breakpoint resume downloads. The code contains specific calling instructions. The program mainly uses the HTTP protocol to download files. The HTTP1.1 protocol must specify that the file should be closed after the end of the document.
25 Jul 2016
PHP file download class code, PHP file download processing class
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images