Created
June 11, 2012 10:46
-
-
Save priithansen/2909528 to your computer and use it in GitHub Desktop.
Emhi weather extract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Simple HTML DOM Parser http://simplehtmldom.sourceforge.net/ */ | |
include('simple_html_dom.php'); | |
$html = file_get_html('http://www.emhi.ee/index.php?ide=21&v_kaart=0&go=5'); | |
foreach($html->find('table[cellpadding=2] tr[bgcolor=#F7F7F7], tr[bgcolor=#FFFFFF]') as $row){ | |
foreach($row->find('td') as $cell) { | |
$item[] = $cell->innertext; | |
} | |
$articles[] = $item; | |
unset($item); | |
} | |
print_r($articles); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment