时间:2021-07-01 10:21:17 帮助过:21人阅读
|
php通过Google API获取当前天气信息,只需 3 行代码,大家在使用时只需要把其中的 ADDRESS 换成你想要的城市即可。
代码如下:
xpath("/xml_api_reply/weather/current_conditions/condition");
echo $information[0]->attributes();
?>
您可能感兴趣的文章:
php 天气预报代码一例
php调用yahoo sina api天气预报的实现代码
php调用google天气api的实例代码 |