PHP做天气预报采集程序解决方案
Jun 13, 2016 am 10:11 AM
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=上海

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Google Pixel 9 and Pixel 9 Pro rumoured to gain Creative Assistant AI upon release

Google Tensor G4 of Pixel 9 Pro XL lags behind Tensor G2 in Genshin Impact

Google app beta APK teardown reveals new extensions coming to Gemini AI assistant

Google Pixel 9 smartphones will not launch with Android 15 despite seven-year update commitment

Google AI announces Gemini 1.5 Pro and Gemma 2 for developers

New Google Pixel desktop mode showcased in fresh video as possible Motorola Ready For and Samsung DeX alternative

Google Pixel 9 Pro XL gets tested with desktop mode

Google opens AI Test Kitchen & Imagen 3 to most users
