PHP做天气预报采集程序解决方案

WBOY
Release: 2016-06-13 10:11:49
Original
879 people have browsed it

PHP做天气预报采集程序
求解答:PHP做天气预报采集程序,根据访问者的ip,判断得出当前城市天气预报。

------解决方案--------------------
先获取用户ip 通过ip得到用户所在地,然后通过所在地获取天气信息,下面是两个接口:

http://counter.sina.com.cn/ip/

http://www.google.com/ig/api?hl=zh-cn&weather=shanghai
------解决方案--------------------
Google的天气api weather参数可以填中文

http://www.google.com/ig/api?hl=zh-cn&weather=上海

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template