New write timing news thief

xiaoxiao2021-03-06  112

I have a local portal, and the weather on the website is updated every day.

I feel quite trouble, so I wrote a timed news thief, posting you, please refer to the system requirements: Support FSO server UDP TCP / IP No shield below the thief FileName Tianqi.aspwrite by Niaoked QQ408611119 <% if Hour (now) = 9 and minute (now) <30 thengetCategories () end if Function getCategories () on error resume nextDim oXMLHTTP 'As ObjectDim oCategories' As ObjectDim BodyTextDim Pos, Pos1Set oXMLHTTP = CreateObject ( "Microsoft.XMLHTTP")' --- set the XMLHTTP CALL AND ISSUE Send (No Parm As Category '--- is Included in Urloxmlhttp.Open "get", "http://weather.china.com.cn/travel_gntq.phina.com.cn/travel_gntq.php?cityid=56196&cityname= Mianyang", False' this place into your own address oXMLHTTP.send '--- load the response into the Categories data island BodyText = oXMLHTTP.responsebody BodyText = BytesToBstr (BodyText, "gb2312") Pos = Instr (BodyText, "") Bodytext = MID (Bodytext, POS, POS1) bodytext = split (bodytext, "") Body = MID (Bodytext (4), POS, LEN (BodyText (4)) - POS) Body = Split (Body, "") Body1 = Split (Replace (Replace (2), "
", " ")," "," "," "," ")," Weather ") for i = 1 to Ubound (Body1) Body3 = Split (Body1 (i)," [Today] ") Weather = Replace (Weather," 2 $ ","

[Tomorrow] ") Weather = Replace (Weather," 3 $ "," [next day] ") set fs = createObject (" scripting.filesystemObject ") set f = fs.CreateTextFile (request.ServerVariables ( "APPL_PHYSICAL_PATH") & "tq.js", True) f.write ( "document.write ( 'Mianyang Weather Forecast:');" & vbcrlf & replace (weather, "
"" "" "") F.close set f = nothing set fs = nothingResponse.write "Mianyang Weather Forecast:" & WeatherSet Oxmlhttp = Nothing if Err.Number <> 0 TenResponse.write "error, error description:" & ERR. Description & "
Error Source" & Err.SourceResponse.end () end ifend function

转载请注明原文地址:https://www.9cbs.com/read-102795.html

New Post(0)