네이버 실시간 검색어 20개 추출 > php

본문 바로가기
사이트 내 전체검색

php

네이버 실시간 검색어 20개 추출

페이지 정보

작성자 서방님 댓글 0건 조회 341회 작성일 18-08-17 11:59

본문

출처 : https://sir.kr/g5_tip/7214


<?
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);
?>

댓글목록

등록된 댓글이 없습니다.

Total 612건 10 페이지
게시물 검색

회원로그인

접속자집계

오늘
70
어제
84
최대
1,347
전체
154,441
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.