gusucode.com > 爱美尔女性商城源码 1.0源码程序 > wen/admin/LaoYRSS.asp
<!--#include file="../Inc/conn.asp"--> <!--#include file="admin_check.asp"--> <% id=LaoYRequest(Trim(request("id"))) Sub CreateDefaulthtml() Dim tRs,tSql Dim Url,Html Dim ClassID dim filename,MDBpath,fso,fout Server.ScriptTimeout=1000 Set fso = Server.CreateObject("Scripting.FileSystemObject") Set tRs=server.CreateObject("adodb.recordset") If ID<>"" then trs.open "select * From ["&tbname&"_Class] Where link=0 and ID="&ID&" order by ID desc",conn,3,2 Else trs.open "select * From ["&tbname&"_Class] Where link=0 order by ID desc",conn,3,2 End if dim http,reurl set http=Server.createobject("Microsoft."&chr(120)&"MLHTTP") While Not tRs.eof filename="../rss/Rss"&trs("id")&".xml" Http.open "GET","http://"&request.ServerVariables("Server_NAME")&""&SitePath&"rss/rss.asp?id="&trs("id")&"",false Http.send() set objStream = Server.CreateObject("ADODB.Stream") objStream.type = 1 objStream.open objstream.write http.responseBody objstream.saveToFile server.mappath(filename),2 tRs.movenext Wend tRs.close Http.open "GET","http://"&request.ServerVariables("Server_NAME")&""&SitePath&"rss/rss.asp?id=9999",false on error resume next Http.send() set objStream = Server.CreateObject("ADODB.Stream") objStream.type = 1 objStream.open objstream.write http.responseBody objstream.saveToFile server.mappath("../rss/Rss.xml"),2 if err then err.Clear response.Write("error") else Call Info("更新成功!") end if End Sub Call CreateDefaulthtml() %>