fsockopen returning server error(0)
问题 I'm checking fsockopen in Ubuntu server 13.04 with this code: <?php $fp = fsockopen("www.google.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.example.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> and the server returning php_network_getaddresses: getaddrinfo failed: System error (0) Any help with this? 回答1: There is no