<%
'================================================
'函数名:findmatch
'作 用:截取相匹配的内容
'返回值:截取后的字符串
'================================================
public function findmatch(byval str, byval start, byval last)
dim match
dim s
dim filterstr
dim matchstr
dim strcontent
dim arrayfilter()
dim i, n
dim brepeat
if len(start) = 0 or len(last) = 0 then exit function
on error resume next
matchstr = "(" & correctpattern(start) & ")(.+?)(" & correctpattern(last) & ")"
dim re
set re = new regexp
re.ignorecase = true
re.global = true
re.pattern = matchstr
set s = re.execute(str)
n = 0
for each match in s
if n = 0 then
n = n + 1
redim arrayfilter(n)
arrayfilter(n) = match
else
brepeat = false
for i = 0 to ubound(arrayfilter)
if ucase(match) = ucase(arrayfilter(i)) then
brepeat = true
exit for
end if
next
if brepeat = false then
n = n + 1
redim preserve arrayfilter(n)
arrayfilter(n) = match
end if
end if
next
set s = nothing
set re = nothing
strcontent = join(arrayfilter, "|||")
strcontent = replace(strcontent, start, "")
strcontent = replace(strcontent, last, "")
findmatch = replace(strcontent, "|||", vbnullstring, 1, 1)
exit function
end function
private function correctpattern(byval str)
str = replace(str, "", "")
str = replace(str, "~", "~")
str = replace(str, "!", "!")
str = replace(str, "@", "@")
str = replace(str, "#", "#")
str = replace(str, "%", "%")
str = replace(str, "^", "^")
str = replace(str, "&", "&")
str = replace(str, "*", "*")
str = replace(str, "(", "(")
str = replace(str, ")", ")")
str = replace(str, "-", "-")
str = replace(str, "+", "+")
str = replace(str, "[", "[")
str = replace(str, "]", "]")
str = replace(str, "<", "<")
str = replace(str, ">", ">")
str = replace(str, ".", ".")
str = replace(str, "/", "/")
str = replace(str, "?", "?")
str = replace(str, "=", "=")
str = replace(str, "|", "|")
str = replace(str, "$", "$")
correctpattern = str
end function
'================================================
'函数名:gethttppage
'作 用:获取http页
'参 数:url ----远程url
'返回值:远程html代码
'================================================
public function getremotedata(byval url)
cset = "gb2312"
dim strheader
dim l
on error resume next
dim retrieval
dim objstream
set objstream = createobject("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
set retrieval = createobject("msxml2.xmlhttp")
with retrieval
.open "get", url, false
.setrequestheader "referer", url
.send
if .readystate <> 4 then exit function
if .status > 300 then exit function
'--获取目标网站文件头
strheader = .getresponseheader("content-type")
strheader = ucase(strheader)
objstream.write (.responsebody)
end with
set retrieval = nothing
if len(strheader) > 0 then
'--获取目标文件编码
l = instrrev(strheader, "charset=", -1, 1)
if l > 0 then
cset = right(strheader, len(strheader) - l - 7)
else
cset = cset
end if
end ifobjstream.position = 0
objstream.type = 2
objstream.charset = trim(cset)
getremotedata = objstream.readtext
objstream.close
set objstream = nothing
exit function
end function
%>
<%
fromurl = "http://www.111com.net"aa = trim(request.form("aa"))
bb = trim(request.form("bb"))
if aa<>"" and bb<>"" then response.write findmatch(getremotedata(fromurl),aa,bb)
%>
茶杯头甜蜜终章dlc 官方手机版v1.0.0.3
下载火柴人传说暗影格斗内置菜单 最新版v3.0.1
下载荒野乱斗测试服 安卓版v61.10.3
下载荒野乱斗彩虹服 安卓版v61.10.3
下载寒霜启示录 安卓版v1.25.10
寒霜启示录是一款生存模拟游戏,不少玩家可能对于末日都有着自己
末日城堡免广告版 安卓最新版v0.7.1
末日城堡免广告版是一款非常好玩的模拟经营类游戏,内部可以不看
甜蜜人生模拟器 最新版v1.4.5
甜蜜人生模拟器是一款非常好玩的模拟恋爱手游,玩家在这里能够对
武器锻造师内置功能菜单 v10.4
武器锻造师内置菜单版是游戏的破解版本,在该版本中为玩家提供了
开放空间overfield 安卓版v1.0.5
开放空间Overfield是一款箱庭养成经营手游,让你在广阔