我爱Aspx >> Asp.Net >> 用ASP编写下载网页中所有资源的程序fn=getFileName(url)
urlhead=left(url,(instr(replace(url,"//",""),"/")+1))
urlpath=replace(left(url,instrRev(url,"/")),urlhead,"")
strContent = getHTTPPage(url)
mystr=strContent
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "(src|href)=.[^\>]+? "
Set Matches =objRegExp.Execute(strContent)
For Each Match in Matches
str=Match.Value
str=replace(str,"src=","")
str=replace(str,"href=","")
str=replace(str,"""","")
str=replace(str,"'","")
filename=GetfileName(str)
getRet=getVirtual(str,urlpath,urlhead)
temp=Replace(getRet,"//","**")
start=instr(temp,"/")
endt=instrRev(temp,"/")-start+1
if start>0 then
repl=virtual&mid(temp,start)&" "
'response.Write repl&"<br>"
mystr=Replace(mystr,str,repl)
dir=mid(temp,start,endt)
temp=truepath&Replace(dir,"/","\")
CreateDir(temp)
'response.Write getRet&"||"&temp&filename&"<br><br>"
SaveToFile getRet,temp&filename
end if
Next
set Matches=nothing
end if
%>
上一篇: IIS HTTP500内部错误解决办法
下一篇: ASP实用技巧:强制刷新和判断文件地址
Ҷƪл˵?
ASP程序性能测试报告[05-15]
Web服务器上防范基于ASP程序的木..[05-15]
利用ASP木马程序获取管理权限[05-15]
一个ASP木马程序的源代码[05-15]
一个ASP统计制作实例[05-15]
用文本+ASP打造新闻发布系统[05-15]
防范ASP木马的十大基本原则[05-15]
ASP木马的原理和基本防范方法[05-15]
用ASP木马实现FTP和解压缩[05-15]
在ASP程序中实现数据库事务控制[05-15]
ASP程序性能测试报告[05-15]
用ISAPIfilter使INC、ASA文件安全[05-15]
Web服务器上防范基于ASP程序的木..[05-15]
IIS服务器排错指南及错误代码大全[05-15]
利用ASP木马程序获取管理权限[05-15]
一个ASP木马程序的源代码[05-15]
一个ASP统计制作实例[05-15]
用文本+ASP打造新闻发布系统[05-15]
防范ASP木马的十大基本原则[05-15]
ASP木马的原理和基本防范方法[05-15]