느 분께서 디시가 댓글을 http://gall.dcinside.com/comment/view에 갤러리id 글번호 댓글페이지 정보 담아서 post로 요청한다고 해서

관련 자바 코드를 검색해보니


//Construct data

String "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");

data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("홍길동", "UTF-8");

//Send data

URL url = new URL("http://localhost:8080/fdfd/index.jsp");

URLConnection conn = url.openConnection();

conn.setDoOutput(true);

wr = new OutputStreamWriter(conn.getOutputStream());

wr.write(data);

wr.flush();


이런 내용이 있었습니다.


URL url = new URL() <- 여기에 http://gall.dcinside.com/comment/view을 넣어야 한다는 것 까진 알겠는데

String data에는 대체 무슨 내용을 넣어야 하나요? 여기에 갤러리id 글번호 댓글페이지 정보를 어떻게 담나요?    

혹시 제가 알 수 있는 방법이라도 있을까요? 아무리 html 소스를 뜯어도 방법을 알 수가 없습니다.