復制代碼 代碼如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'------------------------------
'程序名稱:藍色空間 天氣小偷
'程序設計:小馬
'QQ:55100100
'網站:http://www.bluespace.cn(藍色空間)
'日期:2005-11-15
'------------------------------
Dim strArray(9,2),AreaID
strArray(1,0) = "index.htm"
strArray(1,1) = "華北地區"
strArray(2,0) = "hd.htm"
strArray(2,1) = "華東地區"
strArray(3,0) = "hn.htm"
strArray(3,1) = "華南地區"
strArray(4,0) = "hz.htm"
strArray(4,1) = "華中地區"
strArray(5,0) = "db.htm"
strArray(5,1) = "東北地區"
strArray(6,0) = "xb.htm"
strArray(6,1) = "西北地區"
strArray(7,0) = "xn.htm"
strArray(7,1) = "西南地區"
strArray(8,0) = "ga.htm"
strArray(8,1) = "港澳臺地區"
AreaID = Request.QueryString
If AreaID = "" Then AreaID = 1
Sub GetPage()
Dim strUrl,strTmp,strTmp1
strUrl = "http://weather.265.com/"&strArray(AreaID,0)
strTmp = GetHttpPage(strUrl)
strTmp1 = strCut(strTmp,"<table width=""750"" border=""0"" cellpadding=""2"" cellspacing=""1"" bgcolor=""4952BC"">","<script language=""javascript"">",2)
strTmp1 = "<table width=""750"" border=""0"" cellpadding=""2"" cellspacing=""1"" bgcolor=""4952BC"">"&strTmp1
strTmp1 = Replace(strTmp1,"width=""750""","width='760' align='center'")
strTmp1 = Replace(strTmp1,"bgcolor=""4952BC""","bgcolor='#cccccc'")
strTmp1 = Replace(strTmp1,"bgcolor=""#e4f0f8""","bgcolor='#ffffff' onmouseover=""sbar(this)"" onmouseout=""cbar(this)""")
strTmp1 = "<!--生成時間:"&Now()&"-->"&vbCrLf&strTmp1
Response.Write strTmp1
End Sub
Function getHTTPPage(url)
On Error Resume Next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing