简体   繁体   English

使用php或javascript从html表中检索(获取)当前天气数据

[英]Retrieve (get) current weather data from html table with php or javascript

I would like to get current weather data from html table from the other site. 我想从其他站点的html表中获取当前的天气数据。 Web page from which i would like to get the current (refresh every hour) information about river, flow and other information: http://www.arso.gov.si/vode/podatki/stanje_voda_samodejne.html . 我想从中获取有关河流,流量和其他信息的当前(每小时刷新)信息的网页http : //www.arso.gov.si/vode/podatki/stanje_voda_samodejne.html

The question is how can i retrieve data for all columns (data about the river) but not for all rows (rivers) example river Mura, Drava, Sora. 问题是我如何才能检索所有列(有关河流的数据)而不是所有行(河流)的数据,例如穆拉河,德拉瓦河,索拉河。

I would like to display data with php or javascript on table on my site. 我想在我的网站上的桌子上用php或javascript显示数据。 Please help! 请帮忙!

get data from url 从网址获取数据

This will give you html of given page. 这将为您提供给定页面的html。

$content = file_get_contents('you url here');
$this->html =  $content;
$this->process();
function process(){

// Your html extraction code here
}

Note 注意

Webscrping is use for scrap a public data from website.Its depend on policy of website. Webscrping用于从网站抓取公共数据,它取决于网站的政策。

https://www.quora.com/What-is-the-legality-of-web-scraping https://www.quora.com/What-is-the-legality-of-web-scraping

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM