Home  >  Article  >  php教程  >  利用中国天气预报接口实现简单天气预报

利用中国天气预报接口实现简单天气预报

WBOY
WBOYOriginal
2016-06-06 20:25:291315browse

这篇文章主要介绍了利用中国天气预报接口实现简单天气预报的示例,大家参考使用吧

复制代码 代码如下:


header("content-type:text/html;charset=utf-8");
$weather = file_get_contents("http://www.weather.com.cn/data/sk/101280601.html");
echo $weather;
?>

复制代码 代码如下:






澶╂皵棰勬姤



杩欓噷鏄
Statement:
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