$file='www.xxx.com.cn';
 $fp = fsockopen($file, 80, $errno, $errstr);
if (!$fp) {
    echo "999";
    echo "$errstr ($errno) <br />\n";
} else {
   fputs($fp,"GET / HTTP/1.0\nHost: $file\n\n");
        while(!feof($fp)) {
                echo file_get_contents($fp);
        }
        fclose($fp);
}报错: 
HTTP/1.1 400 Bad Request Content-Type: text/html Date: Fri, 08 Apr 2011 06:46:11 GMT Connection: close Content-Length: 39
Bad Request (Invalid Hostname)
不知道是什么原因引起的?希望高手帮帮忙!