For example, you cannot download a Chinese name or a file name with spaces. In addition, if the Chinese name is garbled, The Post is Last edited by lfcyk at 2013-01-2222:4& lt ;? Php & nbsp; ** & nbsp; * & nbsp; remote File Download supports resumable data transfer & nbsp; & nbs. For more information, see Chinese names and space-related file names. In addition, if the Chinese name is renamed as garbled characters
This post was last edited by lfcyk at 22:41:49
/**
* Supports resumable Upload for remote file downloads.
*/
Class HttpDownload {
Private $ m_url = "";
Private $ m_urlpath = "";
Private $ m_scheme = "http ";
Private $ m_host = "";
Private $ m_port = "80 ";
Private $ m_user = "";
Private $ m_pass = "";
Private $ m_path = "/";
Private $ m_query = "";
Private $ m_fp = "";
Private $ m_error = "";
Private $ m_httphead = "";
Private $ m_html = "";
/**
* Initialization
*/
Public function PrivateInit ($ url ){
$ Urls = "";
$ Urls = @ parse_url ($ url );
$ This-> m_url = $ url;
If (is_array ($ urls )){
$ This-> m_host = $ urls ["host"];
If (! Empty ($ urls ["scheme"]) $ this-> m_scheme = $ urls ["scheme"];
If (! Empty ($ urls ["user"]) $ this-> m_user = $ urls ["user"];
If (! Empty ($ urls ["pass"]) $ this-> m_pass = $ urls ["pass"];
If (! Empty ($ urls ["port"]) $ this-> m_port = $ urls ["port"];
If (! Empty ($ urls ["path"]) $ this-> m_path = $ urls ["path"];
$ This-> m_urlpath = $ this-> m_path;
If (! Empty ($ urls ["query"]) {
$ This-> m_query = $ urls ["query"];
$ This-> m_urlpath. = "? ". $ This-> m_query;
}
}