高分求助!!!!高手进

titletitletitle 2010-05-18 06:25:54
http://www.500wan.com/static/info/ssq/project/10056_1_1.txt

比如网站有一个txt文件,我如何用程序把它读出来。或者下载下来!
...全文
169 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
ctwoz 2010-05-19
  • 打赏
  • 举报
回复
不懂…学习…
  • 打赏
  • 举报
回复
自己写个SOCKET去那个网站读呗....
lihuijie5 2010-05-19
  • 打赏
  • 举报
回复
路过 111
jldream110 2010-05-18
  • 打赏
  • 举报
回复
路过 学习
向立天 2010-05-18
  • 打赏
  • 举报
回复
试试这样
char    buff[8192];
CString strXMLPath, strQueryInfo, strUrl;
strUrl = "http://www.500wan.com/static/info/ssq/project/10056_1_1.txt";
SetConnectTool(strUrl, strXMLPath);

CHttpFile* pHttpFile = m_pHttpConnect->OpenRequest(CHttpConnection::HTTP_VERB_GET, strXMLPath, NULL, 1, NULL, NULL, m_dwHttpRequestFlags);
try
{
if(pHttpFile==NULL||!pHttpFile->SendRequest())
{
pHttpFile->Close();
delete pHttpFile;
return;
}
}catch(...)
{
AfxMessageBox("网络连接异常!");
delete pHttpFile;
return;
}

pHttpFile->QueryInfo(HTTP_QUERY_CONTENT_LENGTH, strQueryInfo);
DWORD dwLen=atol(strQueryInfo);
//从服务器读取文件
int nCount, nRead = 0;
//下载文件
while((nCount=pHttpFile->Read(buff, DOWNLOAD_SPEED))>0)
{
nRead += nCount;
m_strWebContent += buff;
m_strWebContent = m_strWebContent.Left(nRead);
}
pHttpFile->Close();
delete pHttpFile;
liutengfeigo 2010-05-18
  • 打赏
  • 举报
回复
去百度一下?
cattycat 2010-05-18
  • 打赏
  • 举报
回复
自己写socket,连接到这个网站,get这个url,获取文件。然后从中读取数据
chaoliu1024 2010-05-18
  • 打赏
  • 举报
回复
菜鸟进来顶一下~~
Flex中有个HttpServer类,用那个实现这个感觉比较好!
wxwlll 2010-05-18
  • 打赏
  • 举报
回复
用迅雷
werly 2010-05-18
  • 打赏
  • 举报
回复
可以通过分析html的标签获得
hoya5121 2010-05-18
  • 打赏
  • 举报
回复
http://124.254.44.84/Articles/Article/441.aspx
hoya5121 2010-05-18
  • 打赏
  • 举报
回复
BOOL GetUrlCacheEntryInfo(
__in LPCTSTR lpszUrlName,
__out LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
__in_out LPDWORD lpcbCacheEntryInfo
);

hoya5121 2010-05-18
  • 打赏
  • 举报
回复
http://blog.chinaunix.net/u1/59687/showart_494765.html

69,336

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧