您的位置:程序门 -> vc/mfc -> 网络编程



求教向asp空间发送post的问题 代码如下


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求教向asp空间发送post的问题 代码如下
发表于:2007-03-31 14:12:08 楼主
cstring       servername;      
    cstring       object;      
    internet_port       s_nport;      
    dword       dwservicetype1;  

  afxparseurl( "http://ww.41pj.com/1//login.asp ",dwservicetype1,servername,object,s_nport);
cinternetsession       isession( "tax       ssl       http       sender ");  

     
    chttpconnection*       piserver       =       null;      
    chttpfile*       pfile       =       null;      
  piserver       =       isession.gethttpconnection(servername,     s_nport,null,null);      
            pfile                   =       piserver-> openrequest(0,       object);       //,       null,       1,       null,       null,       dwhttprequestflags);      
                  char       outbuff[300]       =       "   134,角色,密码,大区,服务器,等级,123 "   ;    
      bool       result       =pfile-> sendrequest(null,0,outbuff,strlen(outbuff)+1);
if(result==0)
{
messagebox( "发送错误 ");
}
else
{

      cstring       ther= " ";      
        pfile-> readstring(ther);
messagebox(ther);
    }      


发送是发送过去了   那边读返回值   老是nono郁闷啊   怎么才能发上去啊


快速检索

最新资讯
热门点击