即通过程序模拟浏览器访问iis服务器...
框架是怎样的?
谢谢//
[最好c/c++环境]

解决方案 »

  1.   

    http协议
    IE 访问头部:GET /1.asp?id=323432 HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: zh-cn
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2)
    Host: www.hch.com
    Connection: Keep-Alive
    .
      

  2.   

    http://member.netease.com/~maqianli/vc/Document/D_142.htm
      

  3.   

    给你端和服务器通讯的代码CInternetSession INetSession;
    CHttpConnection* pHttpServer=NULL;   
    CHttpFile* pHttpFile=NULL;
    try
    {
    INetSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT        , 120*1000);
    INetSession.SetOption(INTERNET_OPTION_DATA_SEND_TIMEOUT      , 120*1000);
    INetSession.SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT   , 120*1000);
    INetSession.SetOption(INTERNET_OPTION_CONTROL_SEND_TIMEOUT   , 120*1000);
    INetSession.SetOption(INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT, 120*1000);

    pHttpServer= INetSession.GetHttpConnection(m_strServerIp); //IP地址
    pHttpFile= pHttpServer->OpenRequest(CHttpConnection::HTTP_VERB_POST, 
    szServreName,
    NULL,
    1, 
    NULL, 
    NULL, 
    INTERNET_FLAG_DONT_CACHE); // TRACE(szServreName); SetDlgItemText(IDC_STATIC_MESSAGE,"向服务起提出发送请求.....");
    if (!pHttpFile->SendRequestEx(nFileLen))
    {
    if (pHttpFile!=NULL)
    {
    pHttpFile->Close();
    delete pHttpFile;
    }
    if ( pHttpServer!=NULL)
    {
    pHttpServer->Close();
    delete pHttpServer;
    }
    INetSession.Close();
    MessageBox("向服务器发送请求失败!","错误", MB_OK|MB_ICONERROR);
    INetSession.Close();
    return false;
    }
    SetDlgItemText(IDC_STATIC_MESSAGE,"开始向服务器发送数据....."); pHttpFile->Write(szSend,nFileLen);      //将读取到的数据发送出去

    SetDlgItemText(IDC_STATIC_MESSAGE,"发送完毕,正在结束发送.....");
    if (!(pHttpFile->EndRequest()))
    {
    if (pHttpFile!=NULL)
    {
    pHttpFile->Close();
    delete pHttpFile;
    }
    if ( pHttpServer!=NULL)
    {
    pHttpServer->Close();
    delete pHttpServer;
    }
    INetSession.Close();
    MessageBox("结束传送请求失败", "错误", MB_OK|MB_ICONERROR);
    INetSession.Close();
    return false;
    }
    SetDlgItemText(IDC_STATIC_MESSAGE,"正在获取服务器返回信息.....");
    nFileLen= pHttpFile->Read(cReceive,sizeof(cReceive)); strcat(szRecv,cReceive);
    if (nFileLen==0)
    {
    if (pHttpFile!=NULL)    delete pHttpFile;
    if ( pHttpServer!=NULL) delete pHttpServer;
    INetSession.Close();
    MessageBox("服务器未返回信息!","错误信息",MB_OK|MB_ICONERROR);
    return false;
    }
    SetDlgItemText(IDC_STATIC_MESSAGE,"已获取服务器返回信息,正在处理....."); }