今天是: + 登录 + 注册 + 控制面板 + 加入收藏 + 设为首页 + +
  →采集系统演示  →娱乐社区演示站    →BT下载  
顾客至上,信誉第一 首页 · 新闻公告 · 下载中心 · 帮助中心 · 产品购买 · 主机空间 · 网络学院 · 技术论坛 · 网站建设
推荐下载
SK信息采集+风讯CMSV4.0 Sp5整
SK信息采集(科汛CMS)整合版3.3
SK信息采集系统V3.3版(单机版)
SK信息采集系统V3.2版 
SK信息采集系统(单机)版V3.1 B
SK信息采集整合(科汛CMS)插件V
SK产品
 
技术文章
SK信息采集安装教程(单机版)
图片采集规则操作演示
sk信息采集3.0视频教程
SK信息采集系统简介
信息采集方案
新闻采集帮助
SK采集基本使用帮助
购买指南
购买步骤
汇款方式
功能对比
产品报价
版本历史
联系我们
购买咨询QQ:软件购买咨询询留言
技术服务QQ:技术服务
手机:(0)13860892492(购买咨询)
电话: 0596-2821043(售后技术服务)
联系邮箱:skxiu2006@sina.com
友情链接

  科汛网络  风讯CMS   网行天下
  中国站长  中国2399分类网

当前位置:SK网络 >> 网络学院 >> 采集专区 >> 浏览文章
)[.\n]*", "$2
") 
response.Write hehe 
Function Hello(strUrl, strStart, strEnd, patrn, replStr) 
Str = GetBody(strUrl) 
Str = MyMid(Str, strStart, strEnd) 
Str = ReplaceTest(patrn, replStr, Str) 
Hello = Str 
End Function 
Function MyMid(Str, strstart, strend) 
If strstart = "" Then 
i = 0 
Else 
i = InStr(Str, strstart) 
End If 
If strend = "" Then 
j = Len(Str) 
Else 
j = InStr(i, Str, strend) 
End If 
MyMid = Mid(Str, i, j - i + 1) 
End Function 
Function ReplaceTest(patrn, replStr, str1) 
Dim regEx, match, matches 
Set regEx = New RegExp 
regEx.Pattern = patrn 
regEx.IgnoreCase = True 
regEx.Global = True 
Set matches = regEx.Execute(str1) 
For Each match in matches 
ReplaceTest = ReplaceTest®Ex.Replace(Match.Value, replStr) 
Next 
End Function 
Function GetBody(Url) 
Set objXML = createObject("Microsoft.XMLHTTP") 
With objXML 
.Open "Get", Url, False, "", "" 
.SEnd 
GetBody = .ResponseBody 
End With 
GetBody = BytesToBstr(GetBody, "GB2312") 
Set objXML = Nothing 
End Function 
Function BytesToBstr(strBody, CodeBase) 
Set objStream = Server.createObject("Adodb.Stream") 
With objStream 
.Type = 1 
.Mode = 3 
.Open 
.Write strBody 
.Position = 0 
.Type = 2 
.Charset = CodeBase 
BytesToBstr = .ReadText 
.Close 
End With 
Set objStream = Nothing 
End Function 
%> 
其他调用示例: 
hehe = Hello("list.mp3.baidu.com/song/A.htm", "", "", ".*()(.*)()[.\n]*", "$2
")

XMLHTTP抓取远程数据的后期处理

<% 
hehe = Hello("mmsg.qq.com/cgi-bin/gddylist?Type=13&Sort=1&Page=3", "", "", ".*((.*)

发表评论】【告诉好友】【打印此文】【收藏此文】【关闭窗口
[2007年05月29日]   来源:不详     【字体: 】【双击滚屏
上一篇:XMLHTTP批量抓取远程资料 下一篇:用XMLHTTP很好的一个例子
 
Copyright © 2006-2008 Skxiu.com

 版权所有 © 2006-2008 SK网络 www.skxiu.com 闽ICP备 06016779号