WEB
[php] html 파싱
하루에 2%만 벌자
2016. 2. 26. 12:46
반응형
simple html dom 을 이용한 html 파싱
http://simplehtmldom.sourceforge.net/
include "./simple_html_dom.php"; $html_txt = file_get_html(http://www.google.com/); // Meta Tab 의 content 내용을 가져옴 $keywords= $html_txt->find("meta[name=keywords]"); $description= $html_txt->find("meta[name=description]"); // tr 내용 $tables = $html_txt->find('tr', 0); |
반응형