Implementing simple weather forecast using China Weather Forecast Interface_PHP Tutorial

WBOY
Release: 2016-07-13 10:40:34
Original
843 people have browsed it

Copy code The code is as follows:

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

Copy code The code is as follows:





Weather Forecast


< ;div class="all">
Here is: city,
The temperature istemperature< /span>,
Wind direction: Wind direction,
Wind power: Wind power





www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/718610.htmlTechArticleCopy the code as follows: ?php header("content-type:text/html;charset=utf-8" ); $weather = file_get_contents("http://www.weather.com.cn/data/sk/101280601.html"); echo $weather; ? Reply...
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template