定时生成,每隔24小时生成一次!!~
恭喜一下自己 hoho!~~~···
下面是代码
[Copy to clipboard] [ - ]CODE:
<%
Server.ScriptTimeOut=9999999
'on error resume next
types=trim(request.QueryString("types"))
cmd=request.QueryString("cmd")
redim kpath(20,1)
kpath(0,0)="mp3index.asp"
kpath(0,1)="index.htm"
kpath(1,0)="mp3songname.asp"
kpath(1,1)="mp3songname.htm"
kpath(2,0)="mp3new100.asp"
kpath(2,1)="mp3new100.htm"
kpath(3,0)="mp3hot500.asp"
kpath(3,1)="mp3hot500.htm"
kpath(4,0)="mp3topsinger.asp"
kpath(4,1)="mp3topsinger.htm"
kpath(5,0)="mp3movie.asp"
kpath(5,1)="mp3movie.htm"
kpath(6,0)="mp3oldsong.asp"
kpath(6,1)="mp3oldsong.htm"
kpath(7,0)="mp3TV.asp"
kpath(7,1)="mp3TV.htm"
kpath(8,0)="mp3singer.asp"
kpath(8,1)="mp3singer.htm"
kpath(9,0)="mp3tagther.asp"
kpath(9,1)="mp3tagther.htm"
kpath(10,0)="mp3DJ.asp"
kpath(10,1)="mp3DJ.htm"
kpath(11,0)="mp3minge.asp"
kpath(11,1)="mp3minge.htm"
kpath(12,0)="mp3xy.asp"
kpath(12,1)="mp3xy.htm"
kpath(13,0)="mp3army.asp"
kpath(13,1)="mp3army.htm"
kpath(14,0)="mp3xs.asp"
kpath(14,1)="mp3xs.htm"
kpath(15,0)="mp3xiaopin.asp"
kpath(15,1)="mp3xiaopin.htm"
kpath(16,0)="mp3quyi.asp"
kpath(16,1)="mp3quyi.htm"
kpath(17,0)="mp3qingyinyue.asp"
kpath(17,1)="mp3qingyinyue.htm"
kpath(18,0)="mp3minyue.asp"
kpath(18,1)="mp3minyue.htm"
kpath(19,0)="mp3ertong.asp"
kpath(19,1)="mp3ertong.htm"
for i=0 to ubound(kpath)-1
if len(types)>0 then
if cstr(types)=cstr(i) then
makehtm kpath(i,0),kpath(i,1),i,types
if cmd=1 then mRemove kpath(i,1)
end if
else
makehtm kpath(i,0),kpath(i,1),i,types
if cmd=1 then mRemove kpath(i,1)
end if
next
sub makehtm(l1,l2,l3,l4)
I1=l4
url = "http://www.11111111111.net/"&l1
if I1="" then I1=l3
Dim sDate,Fso,Fout
sDate = Application("make"&l2)
If IsEmpty(sDate) Or DateDiff("d",sDate,Now())>1 Then
'当没有记录时间或记录时间与当前服务器时间不一至时生成HTML并记录下当前时间
Application.Lock
Application("make"&l2) = Now() '记录当时的时间
Application.UnLock
ComStr = GetPage(url)
if err.number=0 then
'生成代码开始
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
Set Fout = Fso.CreateTextFile(Server.Mappath(l2))
Fout.Write ComStr & VbCrLf
'下面这行是引用判断用的ASP文件
Fout.Write ""
Fout.Close
Set Fout = Nothing
Set Fso = Nothing
'生成代码结束
I1=""
end if
End If
end sub
sub mRemove(l1)
Application.Lock
Application.Contents.Remove("make"&l1)
Application.UnLock
end sub
%>
Oct
16
定时生成html程序代码
发布:liberty | 分类:SEO研究
| 评论:1 | 引用:0 |
浏览:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
Tags:
说明一下怎么用啊,我是菜鸟。谢谢
回复该留言