文件名称:支持断点续传的下载文件的php类.zip
文件大小:3KB
文件格式:ZIP
更新时间:2022-07-31 04:48:57
类库下载-支持断点续传的下载文件的php类
<?php 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 = ""; 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; } } }初始化-打开指定网址--重设各参数-初始化系统-获得某操作错误的原因-判别用Get方法发送的头的应答结果是否正确-看看返回的网页是否是text类型-判断返回的网页是否是特定的类型- HTTP 协议下载文件
【文件预览】:
支持断点续传的下载文件的php类
----down.php(6KB)
----php中文网下载站.url(114B)
----php中文网免费下载站.txt(219B)