百度api获取天气

时间:2014-06-06 11:40:36   收藏:0   阅读:402
<?php

$city="武汉";
$content = file_get_contents("http://api.map.baidu.com/telematics/v3/weather?location=$city&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ");
print_r(json_decode($content));
?>

百度api获取天气,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!