<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %> <% Response.ContentType = "text/vnd.wap.wml" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" %>

<% dim sid sid=request.querystring("sid") On Error Resume Next Server.ScriptTimeOut=9999999 Function getHTTPPage(Path) t = GETBody(Path) End function function getHTTPPage(url) 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,"utf-8") '注意WAP网页用utf-8,WEB用gb2312 set http=nothing if err.number<>0 then err.Clear end function Function BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothing End Function dim urll,city urll=request.querystring("url") city=request.querystring("city") Dim Url,Html,start,over,body,wap,wstr,str Url="http://qq.ip138.com/weather/"&urll&"/"&city&".wml" wstr=getHTTPPage(url) start=Instr(wstr,"

") over=Instr(wstr,"
>按省份查询天气
") body=mid(wstr,start,over-start) body = replace(body,"","") body = replace(body,"","") body = replace(body,"","
") body = replace(body,"","") body = replace(body,"


","

") body = replace(body,"

","") body = replace(body,"

","") if body="" then Response.Write "很遗憾.无法为您的获取天气情况,重新查询
" else Response.write body end if %> 天气首页
<%response.write "返回上级" response.write "
网站首页
" response.write"."&Month(Now)&"月"&Day(Now)&"日"&FormatDateTime(Now,vbshortTime)&"" response.write "

" & Chr(13) %>