|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用cdonts,可以发送、查看邮件,实现webmail的功能。结合wsh,可以实现对nt主机的管理,如nt用户管理、iis虚拟主机设置、exchange邮箱设置等等,就像管理本地机一样方便。asp+|xml|程序|天色预告|xml自己就任于一个当地流派网站,天天网站上的天色都得更新。一朝一夕感应相称贫苦,因而写了一个准时的旧事小偷,帖出来人人参考一下体系请求:撑持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.number<>0then
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
%></p>因为现在数据库都使用标准的SQL语言对数据库进行管理,所以如果是标准SQL语言,两者基本上都可以通用的。SQLServer还有更多的扩展,可以用存储过程,数据库大小无极限限制。 |
|