WAP天气预报小偷代码
网络整理 - 08-29
<% Response.ContentType="text/vnd.wap.wml; charset=utf-8" %><?xml version="1.0" encoding="utf-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml>
<card title="天气预报"><p>
<br/>
选择城市:<select title="选择">
<option selected="selected" value="125">北京</option>
<option value="292">广州</option>
<option value="252">上海</option>
<option value="127">天津</option>
<option value="212">重庆</option>
<option value="115">沈阳</option>
<option value="244">南京</option>
<option value="211">武汉</option>
<option value="166">成都</option>
<option value="186">西安</option>
<option value="82">石家庄</option>
<option value="84">太原</option>
<option value="189">郑州</option>
<option value="103">长春</option>
<option value="17">哈尔滨</option>
<option value="69">呼和浩特</option>
<option value="140">济南</option>
<option value="248">合肥</option>
<option value="287">厦门</option>
<option value="255">杭州</option>
<option value="276">福州</option>
<option value="218">长沙</option>
<option value="296">深圳</option>
<option value="295">南宁</option>
<option value="232">桂林</option>
<option value="264">南昌</option>
<option value="227">贵阳</option>
<option value="1">香港</option>
<option value="2">澳门</option>
<option value="179">昆明</option>
<option value="280">台北</option>
<option value="150">拉萨</option>
<option value="303">海口</option>
<option value="57">兰州</option>
<option value="56">西宁</option>
<option value="78">银川</option>
<option value="28">乌鲁木齐</option></select>
<anchor>[-提交-]
<go href="2.asp" method="post">
<postfield value="$(t)"/>
</go>
</anchor>
<br/>--------
<br/><anchor><prev/>返回上级</anchor><br/>
</p></card></wml>
===================2.asp==============
<% Response.ContentType="text/vnd.wap.wml" %><?xml version="1.0" encoding="gb2312"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="天气预报"><p>
<%
t=request("t")
url="http://weather.qq.com/inc/ss"&t&".htm"
%>
<%
Class clsThief
Private value_
Private src_
Private isGet_
public property let src(str)
src_=str
end property
public property get value
value=value_
end property
private sub class_initialize()
value_=""
src_=""
isGet_= false
end sub
private sub class_terminate()
end sub
private 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
public sub steal()
if src_<>"" then
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",src_ ,false
Http.send()
if Http.readystate<>4 then
exit sub
end if
value_=BytesToBSTR(Http.responseBody,"GB2312")
isGet_= True
set http=nothing
if err.number<>0 then err.Clear
else
response.Write("<script>alert</script>")
end if
end sub
public sub noReturn()
if isGet_= false then call steal()
value_=replace(replace(value_ , vbCr,""),vbLf,"")
end sub
public sub change(oldStr,str)
if isGet_= false then call steal()
value_=replace(value_ , oldStr,str)
end sub
public sub cut(head,bot)
if isGet_= false then call steal()
if instr(value_ , head)>0 and instr(value_ , bot)>0 then
value_=mid(value_ ,instr(value_ ,head)+len(head),instr(value_ ,bot)-instr(value_ ,head)-len(head))
else
value_= "<pcenter"">函数cut指定裁减内容不存在,请重新定义"
end if
end sub
end class
%>
<%
dim myThief,page
set myThief=new clsThief
myThief.src=url
myThief.steal
myThief.noReturn
myThief.cut "<td23""72""center"" background=""/images/r_tembg4.gif""rb12"">","</td></tr><tr><td1""center"" colspan=""2"" background=""/images/line2.gif""></td></tr>"
myThief.change "</td><td23""117"" background=""/images/r_tembg5.gif""center"">"," "
myThief.change "</td></tr><tr><td23""center""><img src=""http://www.jz123.cn/images/tem1.gif""57""13""></td><td23""center"">"," "
page=myThief.value
set myThief=nothing
response.write page
%>
<br/>--------
<br/><anchor><prev/>返回上级</anchor><br/>
</p></card></wml>