这有错误的源码
         $tmp=parse_url("http://localhost:80");
$sock=fsockopen($tmp['host'],$tmp['port']);
if(!$sock){
echo "不能建立连接";
exit();
}
else{
$dump  = "GET ".$tmp['host'].$tmp['path']." HTTP/1.1\r\n";
$dump .= "accept-charset:UTF-8\r\naccept-language:ch\r\n ";
$dump .= "Host:".$tmp['host']."\r\n";
$dump .= "Connection:close\r\n";
fputs($sock,$dump);
}
while($htm=fgets($sock,1024)){
$html.=$html;
}
echo htmlspecialchars($html);