Implementing simple weather forecast using China Weather Forecast Interface_PHP Tutorial
- 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
http://www.bkjia.com/PHPjc/718610.htmlwww.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