\n"; } else { $out = "GET $path HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $response .= fgets($fp, 128); } fclose($fp); $data = explode("\r\n\r\n", $response, 2); $ip = $data[1]; } ?>