网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 网络学院 >> 程序设计 >> VC编程 >> 文章正文
  chttpfile网络交互功能实现...            【字体:
chttpfile网络交互功能实现...
作者:佚名    文章来源:不详    点击数:    更新时间:2007-7-1    
正在装载数据……

程序内部读取网络信息, 该代码可以通过网络提交验证密码再进行判断... 

CInternetSession mySession(NULL,0);
 CHttpFile* myHttpFile=NULL;

 CString myData;
 CString myUrl;
 myUrl = "http://127.0.0.1/yanz.php?name=" + m_myName + "&password=" + m_myPassword;
 myHttpFile=(CHttpFile*)mySession.OpenURL(myUrl);
 while(myHttpFile->ReadString(myData))
 {
             m_SiteInfo = myData;
 }
 
 if( m_SiteInfo == "hao" ){
         CDialog::OnCancel();
 }else{
         AfxMessageBox( "密码错误", NULL, MB_OK );
 }

 myHttpFile->Close();
 mySession.Close();

-----------------------------------------------

CHttpFile Class Members

Construction

CHttpFileCreates a CHttpFile object.

Operations

AddRequestHeadersAdds headers to the request sent to an HTTP server.
SendRequestSends a request to an HTTP server.
SendRequestExSends a request to an HTTP server using the Write or WriteString methods of CInternetFile.
EndRequestEnds a request sent to an HTTP server with the SendRequestEx member function.
QueryInfoReturns the response or request headers from the HTTP server.
QueryInfoStatusCodeRetrieves the status code associated with an HTTP request and places it in the supplied dwStatusCode parameter.
GetVerbGets the verb that was used in a request to an HTTP server.
GetObjectGets the target object of the verb in a request to an HTTP server.
GetFileURLGets the URL for the specified file.
CloseCloses the CHttpFile and frees its resources.
站内文章搜索 高级搜索
文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
     directx 图形接口指南(…
     win2k下的api函数的拦截
     用crypto  api  实现公钥…
     根据别人的md5源码封装的…
     vc中使用gdi+合并jpg图片
     document/view的交互 --…
     windows下的函数hook技术
     windows api函数大全一
     用vc 6.0实现串行通信的…
     vc++技术内幕(第四版)…
  • HashTable和HashMap; Vecto…

  • Hashtable 排序

  • java中final用法

  • 浅析Spring框架下PropertyPl…

  • Cookie又见Cookie-使用Html…

  • 摘:主题:   using springmo…

  • struts异常_does not start …

  • chapter one

  • 内存管理内幕--Jonathan Bar…

  • Windows API一日一练(23)Set…

  •   网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    网络学院©2007 www.23book.net
    为您提供web编程,vb编程,vc编程,服务器架设管理,数据库设计等方面的知识 站长:David