|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
dim sUrl sUrl="http://localhost/index.html" Function streamtochar(StrStream) set stream=CreateObject("ADODB.Stream") stream.type=1 stream.Mode=3 stream.Open stream.Write Strstream stream.Position= 0 stream.Type= 2 stream.Charset="gb2312" streamtochar= stream.ReadText stream.Close set stream=nothing End Function i = i + 1 function getContentByUrl(url) set XmlHttp = CreateObject("MSXML2.XMLHTTP") XmlHttp.open "GET",url,false XmlHttp.send getContentByUrl = streamtochar(oXmlHttp.responseBody) set XmlHttp=nothing end function function getRealContent(url) sContent = getContentByUrl(url) getRealContent=sContent end function html= getContentByUrl(surl) url_start=inStr(html," " ) url_end=inStr(html," ") url=Mid(html,url_start,url_end-url_start) url=replace(url,"“) Date_start=inStr(html,"Washington, D.C. ")+57 Date_end=inStr(html," A. STATUTORY")-14 Date_T=Mid(html,Date_start,Date_end-Date_start) 返回类别: 教程 上一教程: ASP计数器设计详解-1 下一教程: 表单对象TEXTAREA内容的格式控制(回车、换行、空格) 您可以阅读与"抓取网页萃取网页内容的代码"相关的教程: · 用ASP抓取某个网页的内容 · 用ASP实现远程抓取网页到本地数据库 · 网页内容截取组件 · 在ASP中利用ADO显示EXCEL文件内容的函数 · 实现文件下载而不是由IE打开的代码 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |