[1원팁] 네이버 실시간 검색어 20개 추출
[code]
function NaverKeyWord(){
$Curl = curl_init();
curl_setopt($Curl, CURLOPT_URL, "https://datalab.naver.com/keyword/realtimeList.naver?where=main");
curl_setopt($Curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($Curl, CURLOPT_SSL_VERIFYPEER, FALSE);
$Result = curl_exec($Curl);
$RandList = explode("<ul class=\"rank_list\">", $Result);
$RandList = explode("</ul>", $RandList[1]);
$Rand[0] = explode("<span class=\"title\">", $RandList[0]);
for($i=1; $i < count($Rand[0]); $i++){
$Rand[1] = explode("</span>", $Rand[0][$i]);
$ReturnData = trim(strip_tags($Rand[1][0]));
if($ReturnData){
$Return[] = $ReturnData;
}
}
return $Return;
}
$NaverKeyWord = NaverKeyWord();
print_r($NaverKeyWord);
[/code]
댓글 20개
게시글 목록
| 번호 | 제목 |
|---|---|
| 22896 | |
| 22895 | |
| 22885 | |
| 22875 | |
| 22872 | |
| 22862 | |
| 22860 | |
| 22855 | |
| 22849 | |
| 22846 | |
| 22824 | |
| 22812 | |
| 22809 | |
| 22801 | |
| 22795 | |
| 22786 | |
| 22765 | |
| 22756 | |
| 22739 | |
| 22735 | |
| 22685 | |
| 22639 | |
| 22636 | |
| 22607 | |
| 22605 | |
| 22603 | |
| 22592 | |
| 22583 | |
| 22578 | |
| 22577 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기