-1
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
public class Rough_Program
{
public static void main(String[] args) throws IOException
{
String inputLine = null;
String contant = null;
System.setProperty("java.net.useSystemProxies", "true");
System.setProperty("http.proxyHost", "10.10.10.1");
System.setProperty("http.proxyPort", "3128");
URL oracle = new URL("https://www.google.co.in/search?q=Old%20Trafford");
StringBuffer str1 = new StringBuffer();
URLConnection yc = oracle.openConnection();
yc.addRequestProperty("User-Agent", "Mozilla/4.76");
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
while ((inputLine = in.readLine()) != null) {
str1.append(inputLine);
}
contant = str1.toString();
System.out.println(contant);
}
}
코드는 다른 URL의 노력하지만, WWW에 명중하지 URL에 대한 503 : – minku
을 참조하십시오. http://www.checkupdown.com/status/E503.html](http://www.checkupdown.com/status/E503.html)에서 503의 설명과 수정 방법을 확인할 수 있습니다. – Jens
@jane 공유 링크를 확인한 결과 도움이되지 않습니다. 브라우저에서 잘 작동하는 Google 사이트. 하지만 자바를 사용하여 오류가 표시됩니다. – minku