Posted on 2007-01-05 09:21
tiger 阅读(199)
评论(0) 编辑 收藏 引用
#include "afxinet.h"
具体代码
CInternetSession session;
CInternetFile* file = NULL;
try
{
file = (CInternetFile*)session.OpenURL("http://news.sina.com.cn");
}
catch(CInternetException* m_pException)
{
file = NULL;
m_pException->Delete();
return FALSE;
}
CStdioFile dataStore;
if(file)
{
CString somecode;
CString ls_return;
while (file->ReadString (somecode)!=NULL)
ls_return = ls_return+somecode;
file->Close();
}
ls_return就是那个值