几个实用Web Service文档

来源:互联网 发布:最优化方法 pdf 编辑:程序博客网 时间:2024/04/30 08:42


天气预报
地址:http://www.wopos.com/webservice/weather.asmx
介绍:使用 getWeather(city)方法:city-直接输入全国大中小城市及国外中城市中文名
例:
Public sub GetWopWeather(ByVal city As String)
Dim s As String
Try
Dim weat As New localhost.Weather
s = weat.getWeather(city)
If s.IndexOf("没有查到相关结果") > -1 Then
Else
s = s.Replace("图1==", "= s.Replace(",图2==", ">= s.Replace(",天气", ">,天气")
s = s.Replace(",", "
").Replace("==", ":")
End If
Catch ex As Exception
s = "提供天气数据的网络不通,请稍后再试"
End Try
response.write(s)
End sub


手机归属地
地址:http://www.wopos.com/webservice/Mobile.asmx
介绍:使用 getMobileArea(mobileCode) mobileCode-手机号码或前7位

股票走势图
地址:http://www.wopos.com/webservice/Stock.asmx
介绍:使用 getStockChart(StockCode) StockCode-股票代码,返回值为图片的HTTP地址.

IP地址查询
地址:http://www.wopos.com/webservice/ips.asmx
介绍:使用 getIParea(ip)方法返回IP所在地,使用AddIPRange(startIP,EndIP,AreaInfo)增加新的IP地址信息,使用 IpToInt 和 IntToIp可对IP地址从字符串到整型的互相转换.

成语典故
地址:http://www.wopos.com/webservice/chengyu.asmx
介绍:
使用 ChengYuDianGu(chengyu)方法,参数为成语或成语的拼音缩写。如返回多个成语以*_*分隔

原创粉丝点击