在网站上显示天气 [英] display Weather on website

查看:84
本文介绍了在网站上显示天气的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上显示世界各地取决于用户的天气.(IP地址).怎么可能?像这个网站一样
http://www.weather2travel.com/holidayweather/india/ [

I want to show on my website weather of region of world depending on user .(ip address).how it is possible?like this website
http://www.weather2travel.com/holidayweather/india/[^]

推荐答案

有两种方法这样的事情.您可以使用某些 Web服务.例如,在这里看看: http://www.webservicex.net/globalweather.asmx?op=GetWeather [ ^ ].

请参阅:
http://en.wikipedia.org/wiki/Web_service [ http://en.wikipedia.org/wiki/SOAP [从网页中获取特定数据 [如何从另一个站点获取数据 [ ^ ].

-SA
There are two approaches for such things. You may use some Web service. For example, take a look here: http://www.webservicex.net/globalweather.asmx?op=GetWeather[^].

Please see:
http://en.wikipedia.org/wiki/Web_service[^],
http://en.wikipedia.org/wiki/SOAP[^].

Also, you could use some regular Web site (not a Web service) and use the techniques of Web scraping.

Please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA


使用第三方Web服务.
尝试使用Webservicex.net,有几种免费的Web服务可用.
Use third party webservice.
Try Webservicex.net, there are several free web services available.


除了SAKryukov的解决方案之外,这是指向WS的链接,该WS可以根据IP地址查找有关用户位置的信息:

GetGeoIP [
In addition to SAKryukov''s solution, this is a link to a WS to find information about users location depending on IP address:

GetGeoIP[^]


这篇关于在网站上显示天气的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆