$host="www.ite5e.com"; $fp = fsockopen("$host", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno) "; } else { $out = "GET / HTTP/1.1 "; $out .= "Host: $host "; $out .= "Connection: Close "; } fwrite($fp, $out); $i=0; while($i { $i ; $con.=fread($fp,500); } // echo $con; //定义取出的字节数 preg_match("/Content-Length:.?(d )/", $con, $matches); $size = $matches[1]; echo $size; ?>