코드 사본은 다음과 같습니다.
<%@language = "vbscript"CodePage = "936"%>
<%
'-------------------------------
'프로그램 이름 : 블루 우주 날씨 도둑
'프로그래밍 : 조랑말
'QQ : 55100100
'웹 사이트 : http://www.bluespace.cn (파란색 공간)
'날짜 : 2005-11-15
'-------------------------------
Dimstrarray (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) = "홍콩, 마카오 및 대만"
atreaID = request.queryString
ifareaid = ""thenAreaid = 1
SpupgetPage ()
Dimstrurl, strtmp, strtmp1
strurl = "http://weather.265.com/"& strarray (Areaid, 0)
strtmp = gethttppage (strurl)
strtmp1 = strcut (strtmp, "<tablewidth =" "750" "border =" "0" "0" "CellPadding ="2 ""셀 패싱 = "1" "bgcolor =" "4952bc" ">", "<scriptlanguage =" "javascript" ">", 2)
strtmp1 = "<tableWidth ="750 ""Border = "0" "CellPadding ="2 ""CellPacing = ""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
응답 .writestrtmp1
Endsub
functiongethttppage (url)
onerrorresumenext
dimhttp
setthttp = server.createobject ( "microsoft.xmlhttp")
http.open "get", url, false
http.send ()
ifhttp.readystate <> 4then
종료 기능
endif
gethttppage = bytestobstr (http.responsebody, "gb2312")
setthttp = 아무것도 없습니다