首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

用PHP写的一个HTTP下载类

整理日期:2007年03月02日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-03/1172834798-1.html
 {
  $this->m_error .= $this->GetHead("http-state")." - ".$this->GetHead("http-describe")."<br>";
  return false;
 }
}
//
//看看返回的网页是否是text类型
//
function IsText()
{
 if(ereg("^2",$this->GetHead("http-state"))
  && eregi("^text",$this->GetHead("content-type")))
 { return true; }
 else
 {
  $this->m_error .= "内容为非文本类型<br>";
  return false;
 }
}
//
//判断返回的网页是否是特定的类型
//
function IsContentType($ctype)
{
 if(ereg("^2",$this->GetHead("http-state"))
  && $this->GetHead("content-type")==strtolower($ctype))
 { return true; }
 else
 {
  $this->m_error .= "类型不对 ".$this->GetHead("content-type")."<br>";
  return false;
 }
Tags:
用PHP写的一个HTTP下载类
'http://www.etoow.com/html/2007-03/1172834798-1.html
1
2
 
34
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved