<%
'为了支持原创,请保留该处注释,谢谢!
'作者:草上飞
'获取主域名
Function getDomainUrl(url)
tempurl=replace(url,"http://","")
if instr(tempurl,"/")>0 then
tempurl=left(tempurl,instr(tempurl,"/")-1)
end If
getDomainurl=tempurl
End Function
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True Or Len(HttpUrl)<18 Or HttpUrl="$False$" Then
GetHttpPage="$False$"
Exit Function
End If
Dim Http
Set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",HttpUrl,False
Http.Send()
If Http.Readystate<>4 then
Set Http=Nothing
GetHttpPage="$False$"
Exit function
End if
GetHTTPPage=Http.responseText
Set Http=Nothing
If Err.number<>0 then
Err.Clear
End If
End Function
'==================================================
'函数名:ScriptHtml
'作 用:过滤html标记
'参 数:ConStr ------ 要过滤的字符串
' TagName ------要过滤的标签
' FType 1表示过滤左边标签 2表示过滤左右标签及中间的值 3表示过滤左边标签和右边标签,保留内容。
'==================================================
Function ScriptHtml(Byval ConStr,TagName,FType,includestr)
Dim Re
Set Re=new RegExp
Re.IgnoreCase =true
Re.Global=True
Select Case FType
Case 1
Re.Pattern="<" & TagName & "([^>])*("&includestr&"){1,}([^>])*>"
ConStr=Re.Replace(ConStr,"")
Case 2
Re.Pattern="<" & TagName & "([^>])*("&includestr&"){1,}([^>])*>.*?</" & TagName & "([^>])*>"
'response.write constr&"<br>"
ConStr=Re.Replace(ConStr,"")
asp alexa查询小偷程序
内容版权声明:除非注明,否则皆为本站原创文章。