首页 | 心情日记 | 建站心得 | 编程技术 | 大盘分析 | 股市信息 | 学习园地 | 电脑技巧 | 物流外贸 | 另类其它 | 站长推荐 | 给我留言 | 相册

用户登陆
用户:
密码:
 
不保存保存一天
保存一月保存一年

站点日历
73 2024 - 3 48
     12
3456789
10111213141516
17181920212223
24252627282930
31


站点统计

最新评论

日志搜索

 标题   内容


如何屏蔽搜索引擎的蜘蛛抓取 利用ASP正则提取文章里面的图片的有效的src地址
未知 利用ResponseXML的方法调用163天气预报   [ 日期:2011-01-18 11:32:46 ]   [ 来自:本站原创 ]

海外邮件中继,海外退信中继,美国高速VPS,不限流量VPN,邮局维护和管理,邮件网关,EMOS邮件中继,POSTFIX邮件中继,Winwebmail邮件中继,Winmail邮件中继,DBMail邮件中继,JDMail邮件中继,Exchange邮件中继,MDaemon邮件中继 淘宝店:http://shantan.taobao.com 云邮科技官网:www.yunrelay.com

【字体设置:
<!--
以下是抓取的XML源,http://www.163.com/weatherxml/58044.xml


<?xml version="1.0" encoding="GBK"?>
<root>
<weather c="连云港" city="58044" qx="阴转晴" wd="-7℃~-2℃" fl="6~7级" qximg="02.gif,00.gif" lk="1级 干燥 晴天,虽然天气有点凉,但其它条件适宜,路面比较干燥,路况较好。 "/>
</root>
  
-->
<%
  url = "http://www.163.com/weatherxml/58044.xml"  ' 58044 是连云港相对应的天气预报码   
  Set http=Server.CreateObject("Microsoft.XMLHTTP")   
  http.Open "GET",url,False   
  http.send   
  Set xml=Server.CreateObject("Microsoft.XMLDOM")   
  xml.Async=true   
  xml.ValidateOnParse=False   
  xml.Load(http.ResponseXML)     
  If xml.ReadyState>2 Then   
  Response.Write("文档已经准备就绪。状态:"&   xml.ReadyState   &"<br>") '这句可不加
  set res = xml.selectSingleNode("//weather")
     
  Response.Write res.getAttribute("c")
  Response.Write "&nbsp;&nbsp;"
  Response.Write res.getAttribute("wd")
  Response.Write "&nbsp;&nbsp;"
  Response.Write res.getAttribute("qx")
  Response.Write "&nbsp;&nbsp;"
  Response.Write res.getAttribute("fl")
  Response.Write "&nbsp;&nbsp;"
  
  tqimg = split(res.getAttribute("qximg"),",") '以下为显示天气小图标
  if tqimg(0) <> "" then
   Response.Write "<img src='http://news.163.com/img/logo/"& tqimg(0) &"'>"
  elseif tqimg(1) <> "" then
   Response.Write "<img src='http://news.163.com/img/logo/"& tqimg(1) &"'>"
  else 
   response.Write ""
  end if  
  Response.Write "<br>"
  
End if

Set oNode = Nothing 
Set oDoc = Nothing
%>

以下的链接为城市的代码:
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getSupportCity?byProvinceName=All



暂时没有评论
   发表评论 - 不要忘了输入验证码哦!
作者: 用户:  密码:  我要注册 验证码: 
为防止广告注册机程序,验证码不会自动显示,请点击此处显示或者(刷新)验证码!
评论:

禁止表情
禁止UBB
禁止图片
识别链接
识别关键字
确定发布?
最多可以输入200个字,目前你已经输入了0个字;你今日还可以发表10条评论!
 
   

CopyRight © 2008-2010 广东金融学院030904班 All Rights Reserved
Powered by www.030904.com