天速乒乓球地板TS500

如果支持打开远程内容的选项的话,实际上php用fopen或file_get_contents都能获得一个网页的内容,但是默认的函数有个不足的地方就是无法获取HTTP头,这在一些特殊的应用中很不方便,如,有一个链接:

假如它返回的是一个图片,用默认函数就很难识别,但如果通过HTTP应答头来判断就简单多了,此外如果对方通过Refer来防盗链的话,也是无法获取的,用HTTP类就能完美解决这些问题,而且速度也相差无几。
使用方法: $hd=newDedeHttpDown();
$hd->OpenUrl(“”); echo$hd->GetHtml();
//如果保存为文件则用$hd->SaveBin; $hd->Close(); 获得http请求头用
$hd->GetHead 设置请求头 $hd->SetHead; 代码如下:
/*———————————————————————
//织梦Http下载类V1.0 //出自:织梦之旅
//作者:IT柏拉图 //时间:2005-11-1312:39
//声明:首发在落伍者网站,转载请保留版权信息
———————————————————————*/
classDedeHttpDown { var$m_url=””; var$m_urlpath=””;
var$m_scheme=”http”; var$m_host=””; var$m_port=”80″; var$m_user=””;
var$m_pass=””; var$m_path=”/”; var$m_query=””; var$m_fp=””;
var$m_error=””; var$m_httphead=””; var$m_html=””; var$m_puthead=””;
var$BaseUrlPath=””; var$HomeUrl=””;
var$JumpCount=0;//防止多重重定向陷入死循环 // //初始化系统 //
functionPrivateInitreturn; $urls=””; $urls=@parse_url;
$this->m_url=$url; if { $this->m_host=$urls[“host”];
if(!empty$this->m_scheme=$urls[“scheme”]; if){
$this->m_user=$urls[“user”]; } if){
$this->m_pass=$urls[“pass”]; } if){
$this->m_port=$urls[“port”]; }
if)$this->m_path=$urls[“path”];
$this->m_urlpath=$this->m_path; if(!empty{
$this->m_query=$urls[“query”];
$this->m_urlpath.=”?”.$this->m_query; }
$this->HomeUrl=$urls[“host”];
$this->BaseUrlPath=$this->HomeUrl.$urls[“path”];
$this->BaseUrlPath=ereg_replace$”,”/”,$this->BaseUrlPath);
$this->BaseUrlPath=ereg_replace(“/$”,””,$this->BaseUrlPath); } }
// //打开指定网址 // functionOpenUrl { //重设各参数 $this->m_url=””;
$this->m_urlpath=””; $this->m_scheme=”http”;
$this->m_host=””; $this->m_port=”80″; $this->m_user=””;
$this->m_pass=””; $this->m_path=”/”; $this->m_query=””;
$this->m_error=””; $this->JumpCount=0;
$this->m_httphead=Array(); //$this->m_puthead=””;
$this->m_html=””; $this->Close(); //初始化系统
$this->PrivateInit; $this->PrivateStartSession(); } //
//打开303重定向网址 // functionJumpOpenUrl { //重设各参数
$this->m_url=””; $this->m_urlpath=””;
$this->m_scheme=”http”; $this->m_host=””;
$this->m_port=”80″; $this->m_user=””; $this->m_pass=””;
$this->m_path=”/”; $this->m_query=””; $this->m_error=””;
$this->JumpCount++; $this->m_httphead=Array();
$this->m_html=””; $this->Close(); //初始化系统
$this->PrivateInit; $this->PrivateStartSession(); } //
//获得某操作错误的原因 // functionprintError() {
echo”错误信息:”.$this->m_error; echo”具体返回头:
“; foreach($this->m_httpheadas$k=>$v) {echo”$k=>$v
\r\n”;} } // //判别用Get方法发送的头的应答结果是否正确 //
functionIsGetOK() { if(ereg(“^2″,$this->GetHead {returntrue;} else {
$this->m_error.=$this->GetHead.”-“.$this->GetHead.”
“; returnfalse; } } // //看看返回的网页是否是text类型 //
functionIsText() { if(ereg(“^2”,$this->GetHead
&&eregi(“^text”,$this->GetHead {returntrue;} else {
$this->m_error.=”内容为非文本类型或网址重定向
“; returnfalse; } } // //判断返回的网页是否是特定的类型 //
functionIsContentType { if(ereg(“^2″,$this->GetHead
&&$this->GetHead==strtolower {returntrue;} else {
$this->m_error.=”类型不对”.$this->GetHead.”
“; returnfalse; } } // //用Http协议下载文件 // functionSaveToBin {
ifreturnfalse; if{$this->m_error=”连接已经关闭!”;returnfalse;}
$fp=fopen; while{ fwrite($fp,fread; } fclose; fclose; returntrue; } //
//保存网页内容为Text文件 // functionSaveToText {
if$this->SaveBinFile; elsereturn””; } //
//用Http协议获得一个网页的内容 // functionGetHtml() { ifreturn””;
ifreturn$this->m_html; if(!$this->m_fp||@feofreturn””; while{
$this->m_html.=fgets; } @fclose; return$this->m_html; } //
//开始HTTP会话 // functionPrivateStartSession() {
if(!$this->PrivateOpenHost{ $this->m_error.=”打开远程主机出错!”;
returnfalse; } if($this->GetHead==”HTTP/1.1″)$httpv=”HTTP/1.1″;
else$httpv=”HTTP/1.0″; //发送固定的起始请求头GET、Host信息
fputs($this->m_fp,”GET”.$this->m_urlpath.”$httpv\r\n”);
$this->m_puthead[“Host”]=$this->m_host;
//发送用户自定义的请求头
if(!isset($this->m_puthead[“Accept”])){$this->m_puthead[“Accept”]=”*/*”;}
if(!isset($this->m_puthead[“User-Agent”])){$this->m_puthead[“User-Agent”]=”Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.2)”;}
if(!isset($this->m_puthead[“Refer”])){$this->m_puthead[“Refer”]=”
foreach($this->m_putheadas$k=>$v){ $k=trim; if{
fputs($this->m_fp,”$k:$v\r\n”); } } //发送固定的结束请求头
//HTTP1.1协议必须指定文档结束后关闭链接,否则读取文档时无法使用feof判断结束
iffputs($this->m_fp,”Connection:Close\r\n\r\n”); elsefputs;
//获取应答头状态信息 $httpstas=explode(“”,fgets;
$this->m_httphead[“http-edition”]=trim;
$this->m_httphead[“http-state”]=trim;
$this->m_httphead[“http-describe”]=””;
for($i=2;$im_httphead[“http-describe”].=””.trim; } //获取详细应答头
while{ $line=trim(fgets; ifbreak; $hkey=””; $hvalue=””; $v=0; for;$i++){
if$hvalue.=$line[$i]; if$v=1; if$hkey.=$line[$i]; }
$hkey=trim$this->m_httphead[strtolower; } //判断是否是3xx开头的应答
if(ereg(“^3”,$this->m_httphead[“http-state”])) { ifreturn;
if(isset($this->m_httphead[“location”])){
$newurl=$this->m_httphead[“location”]; if(eregi{
$this->JumpOpenUrl; } else{ $newurl=$this->FillUrl;
$this->JumpOpenUrl; } } else
{$this->m_error=”无法识别的转移应答!”;} }// } //
//获得一个Http头的值 // functionGetHead { $headname=strtolower;
if(isset($this->m_httphead[$headname]))
return$this->m_httphead[$headname]; else return””; } //
//设置Http头的值 // functionSetHead {
$this->m_puthead[$skey]=$svalue; } // //打开连接 //
functionPrivateOpenHost() { ifreturnfalse;
$this->m_fp=@fsockopen($this->m_host,$this->m_port,&$errno,&$errstr,10);
if{ $this->m_error=$errstr; returnfalse; } else{ returntrue; } } //
//关闭连接 // functionClose(){ @fclose; } // //补全相对网址 //
functionFillUrl { $i=0; $dstr=””; $pstr=””; $okurl=””; $pathStep=0;
$surl=trimreturn””; $pos=strpos; if$surl=substr; if{
$okurl=”; } elseif { ifreturn””;
elseif { $okurl=”); } else{
$urls=explode; foreach{ if$pathStep++; elseif$dstr.=$urls[$i].”/”;
else$dstr.=$urls[$i]; $i++; }
$urls=explode(“/”,$this->BaseUrlPath); if<=$pathStep) return””;
else{ $pstr=”http://”; for-$pathStep;$i++) {$pstr.=$urls[$i].”/”;}
$okurl=$pstr.$dstr; } } } else { if
$okurl=”;
elseif(strtolower==”http://”) $okurl=$surl; else
$okurl=”; }
$okurl=eregi_replace”,””,$okurl); $okurl=eregi_replace;
return”; } } ?>

Win7之家:关于Windows 8 已知内部版本完全列表

●TPU表层超强耐磨防滑处理 ●高强度聚脂网格布稳定层

最新更新:2011年3月14日,加入3月份的列表。

宝石红 长20m×宽1.8m×厚5.0mm

虽然很多朋友表示对Windows8不太在意,但是不可否认的是,Windows 8
的粉丝不是一般的多。

下面来回顾下Win8的开发情况,当然,大家看到Windows 7
字样也别感觉奇怪,毕竟Windows 8 的开发就是从Windows 7 Post-RTM
开始正式编码的,嗯,“后Win7”时代 :)

Windows 8 开发路线图:M1/M2/M3/Beta1/Beta2/RC/RTM

Windows 8 版本号划分区间:

Windows7Post-RTM:6.1.76xx.x.winmain.xxxxxx-xxxxWindows7Post-RTM:6.1.77xx.x.winmain.xxxxxx-xxxxWindows8Milestone1:6.1.785x.x.winmain_win8m1.xxxxxx-xxxxWindows8Milestone2:6.2.7853.x.winmain_win8m2.xxxxxx-xxxxWindows8Milestone2:6.2.79xx.x.winmain_win8m2.xxxxxx-xxxxWindows8Milestone3:6.2.795x.x.winmain_win8m3.xxxxxx-xxxx2011年2月28日正式开始转入M3开发,当天的版本号是:Windows8Build
6.2.7956.0.winmain_win8m3.110228-1701

现在软媒和大家一起回顾下Windows8 目前的开发版本详细情况——

(NT6.176xxWinmainBranchPost-RTM)6.1.7650.0.winmain.090917-18436.1.7651.0.winmain.090924-1802……6.1.7656.0.winmain.091015-0833……6.1.7658.0.winmain.091019-18506.1.7659.0.winmain.091020-18306.1.7660.0.winmain.091021-17366.1.7661.0.winmain.091022-17556.1.7662.0.winmain.091023-16456.1.7664.0.winmain.091027-1825……6.1.7691.0.winmain.100106-18256.1.7692.0.winmain.100107-17356.1.7693.0.winmain.100111-18206.1.7694.0.winmain.100113-17536.1.7695.0.winmain.100114-18556.1.7696.0.winmain.100115-1725(NT6.177xxWinmainBranchPost-RTM)6.1.7700.0.winmain.100122-19006.1.7702.0.winmain.100126-17516.1.7703.0.winmain.100127-18456.1.7704.0.winmain.100128-19006.1.7705.0.winmain.100129-19306.1.7706.0.winmain.100201-18206.1.7707.0.winmain.100202-17156.1.7709.0.winmain.100204-15156.1.7710.0.winmain.100205-20056.1.7711.0.winmain.100208-17326.1.7712.0.winmain.100211-17406.1.7713.0.winmain.100212-17506.1.7714.0.winmain.100215-14506.1.7715.0.winmain.100217-17156.1.7716.0.winmain.100218-18366.1.7717.0.winmain.100219-17076.1.7718.0.winmain.100223-14036.1.7719.0.winmain.100224-12316.1.7720.0.winmain.100225-18456.1.7721.0.winmain.100226-18326.1.7722.0.winmain.100301-14566.1.7723.0.winmain.100302-18056.1.7724.0.winmain.100303-14356.1.7725.0.winmain.100304-15456.1.7726.0.winmain.100311-18076.1.7727.0.winmain.100315-17406.1.7727.0.winmain.100315-17476.1.7729.0.winmain.100318-1855……6.1.7730.0.winmain.100319-16356.1.7731.0.winmain.100323-1817……6.1.7764.0.winmain.100615-17486.1.7800.0.winmain_win8m1.100816-18556.1.7804.0.winmain_win8m1.100820-17426.1.7809.0.winmain_win8m1.100827-17406.1.7811.0.winmain_win8m1.100831-17316.1.7812.0.winmain_win8m1.100901-18106.1.7814.0.winmain_win8m1.100903-17006.1.7817.0.winmain_win8m1.100910-16226.1.7818.0.winmain_win8m1.100913-18406.1.7821.0.winmain_win8m1.100916-19406.1.7822.0.winmain_win8m1.100920-16256.1.7830.0.winmain_win8m1.100921-xxxx(EscrowBranchforWindows8Milestone1)6.1.7850.0.winmain_win8m1.100922-15086.2.7853.0.winmain_win8m2.100928-10406.2.7855.0.winmain_win8m2.101001-18156.2.7857.0.winmain_win8m2.101006-19086.2.7859.0.winmain_win8m2.101008-13006.2.7866.0.winmain_win8m2.101019-15076.2.7867.0.winmain_win8m2.101020-18006.2.78676.2.7870.0.winmain_win8m2.101025-19006.2.7871.0.winmain_win8m2.101026-18006.2.7874.0.winmain_win8m2.101029-18386.2.7875.0.winmain_win8m2.101101-18326.2.7878.0.winmain_win8m2.101104-17526.2.7880.0.winmain_win8m2.101108-15306.2.7881.0.winmain_win8m2.101109-18166.2.7882.0.winmain_win8m2.101110-16506.2.7883.0.winmain_win8m2.101111-16316.2.7890.0.winmain_win8m2.101122-18106.2.7891.0.winmain_win8m2.101123-19086.2.7892.0.winmain_win8m2.101129-19026.2.7895.0.winmain_win8m2.101202-18456.2.7898.0.winmain_win8m2.101207-16206.2.7899.0.winmain_win8m2.101208-19006.2.7900.0.winmain_win8m2.101209-18306.2.7901.0.winmain_win8m2.101210-17556.2.7902.0.winmain_win8m2.101213-17456.2.7903.0.winmain_win8m2.101215-23256.2.7904.0.winmain_win8m2.101216-18456.2.7905.0.winmain_win8m2.110103-21006.2.7906.0.winmain_win8m2.110105-17506.2.7907.0.winmain_win8m2.110106-1823‎6.2.7907.0.fbl_x.110109-18006.2.7908.0.winmain_win8m2.110107-17556.2.7909.0.winmain_win8m2.110110-15156.2.7910.0.winmain_win8m2.110111-18046.2.7911.0.winmain_win8m2.110112-1725……6.2.7913.0.winmain_win8m2.110114-17456.2.7914.0.winmain_win8m2.110118-16056.2.7915.0.winmain_win8m2.110119-18066.2.7916.0.winmain_win8m2.110121-17156.2.7917.0.winmain_win8m2.110125-17576.2.7918.0.winmain_win8m2.110126-18276.2.7919.0.winmain_win8m2.110127-17336.2.7920.0.winmain_win8m2.110128-17406.2.7920.0.fbl_srv.110128-18236.2.7921.0.winmain_win8m2.110201-20056.2.7922.0.winmain_win8m2.110202-18406.2.7925.0.winmain_win8m2.110207-17366.2.7926.0.winmain_win8m2.110209-17556.2.7927.0.winmain_win8m2.110210-17406.2.7928.0.winmain_win8m2.110214-18256.2.7929.0.winmain_win8m2.110215-18026.2.7930.0.winmain_win8m2.110217-18256.2.7947.0.winmain_win8m2.110218-1608(EscrowBranchforWindows8Milestone2)6.2.7948.0.winmain_win8m2.110221-17036.2.7949.0.winmain_win8m2.110222-15456.2.7950.0.winmain_win8m2.110223-18206.2.7955.0.winmain_win8m3.110224-15026.2.7956.0.winmain_亚洲城会员登录,win8m3.110228-1701

6.2.7959.0.winmain_win8m3.11030x-xxxx6.2.7961.0.winmain_win8m3.110308-1712

下图是 Windows 8build6.2.7930.0.winmain_win8m2.110217-1825 中的Windows
Update截图,微软加入了一个选项让用户决定是否允许自动打完补丁自动重启。

进入2011年3月,每个工作日依然有新的M3 Build
版本出来,细节我们随后会更新放出。

Win7之家@软媒,特别感谢MDL的朋友canouna,随后还会有IE9浏览器正式版和Windows8的消息放出。

相关文章