// 해당 URL을
URL url    = new URL( "http", host, port, dir + "?member_id=" + memberID );
// 연결하고
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
// 응답이
int responseCode = connection.getResponseCode();
                
String line    = "";
// 성공이면
if ( responseCode == HttpURLConnection.HTTP_OK )
{
BufferedReader  br      = new BufferedReader( new InputStreamReader( connection.getInputStream() ) );
    // 해당 URL의 끝을 볼때까지 라인을 읽어서                
    while ( ( line = br.readLine() ) != null)
    {
        result    += line;
    }                    
}

result 값을 파싱하시면 될겁니다.

출처: http://www.javanuri.com/devforum/boardView.jsp?menuId=137425&Id=303830&gb=qna

'프로그래밍 > Java' 카테고리의 다른 글

CLASSPATH  (0) 2009.01.06
HttpURLConnection 사용례  (0) 2009.01.06
04 UDP  (0) 2007.11.27
03 졸려....  (0) 2007.11.27
02 2일째....  (0) 2007.11.27