<%
Dim I
Dim A()
Dim FSO
Dim FSO_File
Dim FilePath
'response.write(Server.Mappath("url.txt"))'虚拟主机上的路径
'FilePath=Server.Mappath("url.txt")
'response.write(Server.Mappath(Request.ServerVariables("PATH_INFO")))
FilePath = LEFT(Server.Mappath(Request.ServerVariables("PATH_INFO")),InStrRev(Server.Mappath(Request.ServerVariables("PATH_INFO")), "\")) & "url.txt"
'response.write(FilePath)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FSO_File = FSO.OpenTextFile(FilePath,1,FALSE,FALSE)
Do While Not FSO_File.AtEndOfStream
ReDim Preserve A(i)
A(i)=FSO_File.ReadLine
i=i+1
Loop
FSO_File.Close
'Dim j
'for j= 0 to ubound(A)
'response.write("<a href="&A(j)&">"&A(j)&"</a><br>")
'next
Randomize timer
i=int(rnd*ubound(A))
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", a(i)
%>
Dim I
Dim A()
Dim FSO
Dim FSO_File
Dim FilePath
'response.write(Server.Mappath("url.txt"))'虚拟主机上的路径
'FilePath=Server.Mappath("url.txt")
'response.write(Server.Mappath(Request.ServerVariables("PATH_INFO")))
FilePath = LEFT(Server.Mappath(Request.ServerVariables("PATH_INFO")),InStrRev(Server.Mappath(Request.ServerVariables("PATH_INFO")), "\")) & "url.txt"
'response.write(FilePath)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FSO_File = FSO.OpenTextFile(FilePath,1,FALSE,FALSE)
Do While Not FSO_File.AtEndOfStream
ReDim Preserve A(i)
A(i)=FSO_File.ReadLine
i=i+1
Loop
FSO_File.Close
'Dim j
'for j= 0 to ubound(A)
'response.write("<a href="&A(j)&">"&A(j)&"</a><br>")
'next
Randomize timer
i=int(rnd*ubound(A))
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", a(i)
%>
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |