|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
写软件都是想的时间比写的时间要长的.如果反过来了就得看看是什么原因了.另外大家可以回去问问公司里的小MM.(一般企业里,跟你们交付软件接触得最多的是她们)自己就任于一个当地流派网站,天天网站上的天色都得更新。一朝一夕感应相称贫苦,因而写了一个准时的旧事小偷,帖出来人人参考一下体系请求:撑持FSO,服务器UDP TCP/IP没有屏障
上面是小偷的内容
FileNameTianQi.asp
WriteByNiaokedQQ408611119
www.ckuyun.com
<%
ifhour(now)=9andminute(now)<30then
getCategories()
endif
FunctiongetCategories()
onerrorresumenext
DimoXMLHTTPAsObject
DimoCategoriesAsObject
DimBodyText
DimPos,Pos1
SetoXMLHTTP=CreateObject("Microsoft.XMLHTTP")
---settheXMLHTTPcallandissuesend(noparmascategory
---isincludedinURL
oXMLHTTP.open"GET","http://weather.china.com.cn/travel_gntq.php?cityid=56196&cityname=绵阳",False这个中央换成你本人的地点
oXMLHTTP.send
---loadtheresponseintotheCategoriesdataisland
BodyText=oXMLHTTP.responsebody
BodyText=BytesToBstr(BodyText,"gb2312")
Pos=Instr(BodyText,"<body")
pos1=Instr(BodyText,"</body>")
BodyText=mid(BodyText,pos,pos1)
BodyText=split(BodyText,"<table")
Pos=Instr(BodyText(4),"<tr")
pos1=Instr(BodyText(4),"</tr>")
Body=mid(BodyText(4),pos,len(BodyText(4))-pos)
body=split(body,"</table>")
body1=split(replace(replace(replace(body(0),"<br>",""),"</td>",""),"</tr>",""),"天色")
fori=1toubound(body1)
body3=split(body1(i),"<td")
weather=weather&"document.write("""&i&"$"&"天色"&HTMLEncode(trim(body3(0)))&""");"&vbcrlf
next
weather=replace(weather,"1$","<FONTcolor=#ffffff>【明天】</FONT>")
weather=replace(weather,"2$","<FONTcolor=#ffffff>【今天】</FONT>")
weather=replace(weather,"3$","<FONTcolor=#ffffff>【后天】</FONT>")
Setfs=CreateObject("Scripting.FileSystemObject")
Setf=fs.CreateTextFile(request.ServerVariables("APPL_PHYSICAL_PATH")&"tq.js",True)
f.write("document.write(绵阳天色预告:);"&vbcrlf&replace(weather,"<BR>",""))
f.close
Setf=nothing
Setfs=nothing
response.write"绵阳天色预告:"&weather
SetoXMLHTTP=Nothing
iferr.number0then
response.write"堕落了,毛病形貌:"&err.description&"<br>毛病来历"&err.source
response.End()
endif
EndFunction
FunctionBytesToBstr(body,Cset)
dimobjstream
setobjstream=Server.CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.Writebody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
setobjstream=nothing
EndFunction
PublicFunctionHTMLEncode(fString)
IfNotIsNull(fString)Then
fString=replace(fString,">",">")
fString=replace(fString,"<","<")
fString=Replace(fString,CHR(32),"")
fString=Replace(fString,CHR(9),"")
fString=Replace(fString,CHR(34),""")
fString=Replace(fString,CHR(39),"")单引号过滤
fString=Replace(fString,CHR(13),"")
fString=Replace(fString,CHR(10)&CHR(10),"</P><P>")
fString=Replace(fString,CHR(10),"<BR>")
HTMLEncode=fString
EndIf
EndFunction
%>
写软件都是想的时间比写的时间要长的.如果反过来了就得看看是什么原因了.另外大家可以回去问问公司里的小MM.(一般企业里,跟你们交付软件接触得最多的是她们) |
|