vc写个函数,发送web请求,回到页面并解析数据

vc写个函数,发送web请求,返回页面并解析数据
以下是一个html网页,可以用ie打开之后,在表单中输入ip和端口,然后会返回一个页面,
页面中有域名地址,

=============================请求页面==========================================
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META content="域名查询服务" name="keywords">
<META content="域名查询服务" name="description">
<html>
<title>ipport</title>
<body>
<form action="http://192.168.1.3/web/search.php" method="post">

IP:<input type="text" name="localIp" id="localIp" value="">
Port:<input type="text" name="localPort" id="localPort" value="">
<input type="submit" name="submit" id="submit" value="查询">
</form> 
</body>
</html>

==============================返回页面===============================================
<html>
<title>return</title>
<body>
域名:www.ias.com
</body>
</html>
=====================================================================================
现在就是要用vc开发一个应用程序,打开这个html文件,
然后发送请求到服务器“http://192.168.1.3/web/search.php”
返回之后,提取页面中的域名字符串.



------最佳解决方案--------------------
utmcmd=se-detail-pop; id58=902X0001mc+WmGQGCNBLAg==; 58home=sz; sz=2011117214657; city=sz; alsm=201111721472; __utmb=253535702.12.10.1295771938; __utmc=253535702; ASP.NET_SessionId=t4rcf145bb0fea55zbeuyaj3

username=testuser&userpwd=123456&btnSubmit=%E7%AB%8B%E5%8D%B3%E7%99%BB%E5%BD%95

/////////////////////////////////////////////////////////////////////////////
在发送的头部信息中是不是还少什么参数???
------其他解决方案--------------------
CInternetSession session;
CHttpFiel *pFile = session.OpenUrl("http://192.168.1.3/web/search.php");
pFile->Read().....
解析之

------其他解决方案--------------------
还可以用CWinHttp等API 去访问URL,然后读取返回的文件,然后自己解析内容
就是这个网页如果返回格式变了,你 parse的代码也要调整
------其他解决方案--------------------
恩,用CInternetSession写比较简单,代码比较少,当前你可以使用socket API去写,抓个包得到数据,然后send模拟发送数据
------其他解决方案--------------------
还是推荐CInternetSession,同时对于IE的话,在一定程度上,也可以考虑用IWebBrowser2->IHtmldocument2接口来做些处理
------其他解决方案--------------------
这个网页源码比较简单!用CInternetSession得到源码后就可以直接用CString来解析了!
------其他解决方案--------------------
引用:
以下是一个html网页,可以用ie打开之后,在表单中输入ip和端口,然后会返回一个页面,
页面中有域名地址,

=============================请求页面==========================================
<meta http-equiv="Content-Type" content="text/html; charset=utf-……


就是这样子
------其他解决方案--------------------
CHttpFiel *pFile = session.OpenUrl("http://192.168.1.3/web/search.php?localIp=1.1.1.1&localPort=80&submit=查询");

------其他解决方案--------------------
utmccn=jump-kw
------其他解决方案--------------------
该回复于2011-01-07 10:05:29被版主删除
------其他解决方案--------------------
ip地址和端口号的参数怎么提交呢?
------其他解决方案--------------------