Home  >  Article  >  Backend Development  >  Implementing simple weather forecast using China Weather Forecast Interface_PHP Tutorial

Implementing simple weather forecast using China Weather Forecast Interface_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:40:34838browse

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...
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
Previous article:PHP calendar production code sharing_PHP tutorialNext article:PHP calendar production code sharing_PHP tutorial

Related articles

See more