다운로드 받은 파일을 다 넣는다.
코드:
<?php
// http://localhost/homepage/crawling/a.php
ini_set("allow_url_fopen",1);
include "simple_html_dom.php";
$data = file_get_html("https://naver.com");
// echo $data;
/*
$a = $data ->find("ul");
foreach($a as $b){
echo $b;
}
*/
$i = 1;
foreach($data->find("ul.list_theme")as $ul){
foreach($ul -> find("li") as $li){
echo $li ->plaintext;
echo "<br><br>";
}
}
?>
결과: