안녕하세요
이번에
CHttpFile 클래스를 이용해서 인터넷프로그래밍(?)에 손대고 있는데요
네이버 로그인된 페이지의 정보가 필요한데
로그인이 되지 않아요 ㅠ_ㅠ
자꾸 로그인 안된 페이지의 정보만 가져오고 ㅠ_ㅠ
CInternetSession session; //CinternetSession 변수 설정
CInternetFile *file=NULL; //Cinternetfile 변수 설정
CHttpConnection *httpsession;
CHttpFile *httpfile;
url.Format("
http://cafe.naver.com/joonggonara.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=10807618");
//네이버 까페 게시물 URL
CString strServerName;
INTERNET_PORT nPort;
DWORD dwServiceType, dwRet;
CString strObject;
AfxParseURL(url, dwServiceType, strServerName, strObject, nPort);
httpsession = session.GetHttpConnection(strServerName,nPort);
LPCTSTR szContentType = TEXT("Content-Type: application/x-www-form-urlencoded\r\n");
//타입정의
CString strArguments = _T("id=ID&pw=PW");
//아이디 비번 저장?
httpfile = httpsession->OpenRequest(CHttpConnection::HTTP_VERB_POST, strObject,
NULL, 1,NULL, NULL,INTERNET_FLAG_KEEP_CONNECTION);
dwRet = httpfile->SendRequest(szContentType, // additional HTTP header
_tcslen(szContentType), // additional HTTP header length
(LPVOID)(LPCTSTR)strArguments, // additional data in HTTP Post or HTTP Put
_tcslen(strArguments));
httpfile = httpsession->OpenRequest(CHttpConnection::HTTP_VERB_GET, strObject,
NULL, 1,NULL, NULL,INTERNET_FLAG_KEEP_CONNECTION);
httpfile->SendRequest();
////////////////////////////////////////////////////////////////////////////////////////////////////
이렇게 작성했는데 영 로그인이 안되네요 ㅠ_ㅠ
어떻게 해야 될까요 ㅠ_ㅠ