我的思路:
用CAsyncSocket发HTTP GET请求,收到含有Form和Input的页面,把每个Input分析出来,形成http://www.xxx.com/xxx.asp?inputname1=value1&inputname2=value2....
其中xxx.asp是Form的Action。
再用CAsyncSocket发HTTP POST请求,发出去。

解决方案 »

  1.   

    POST请求,发出去能打开一个新的IE窗口吗,如果有代理如何解决这个问题
      

  2.   

    CString GetFileFromWebServer(char* sURL,CString szRequest)
    {
    DWORD dwServiceType;
    CString strServer,strObject;
    unsigned short nPort; AfxParseURL(sURL,dwServiceType,strServer,strObject,nPort); CHttpFile* pURLFile;
    CInternetSession isSession; CHttpConnection* isHttp=isSession.GetHttpConnection(strServer,nPort);
    pURLFile=isHttp->OpenRequest(CHttpConnection::HTTP_VERB_POST,strObject);
    CString strHeader=_T("Content-Type: application/x-www-form-urlencoded");
    pURLFile->SendRequest(strHeader,(LPVOID)(LPCTSTR)szRequest, szRequest.GetLength());
    ....//pURLFile为返回的页面内容
    }