一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php 利用Google API 获取当前天气信息代码

时间:2012-01-06 编辑:简简单单 来源:一聚教程网

 代码如下 复制代码

$xml = simplexml_load_file('http://www.google.com/ig/api?weather=长沙');
$information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
echo $information[0]->attributes();

?>

热门栏目