$key = "***-***"; $cx = "***:***"; $keyword = "検索キーワード"; $url = 'https://www.googleapis.com/customsearch/v1?q='.$keyword.'&key='.$key.'&cx='.$cx; $html = file_get_contents($url,true); $count = mb_substr_count($html, "htmlTitle"); echo $count; |
参考
google custom search engine(CSE)を使って、検索結果をjsonで取得するGoogle Custom Search パラメータ
- NAVERとtogetterでのツイート引用をDMで知らせるやつ
2017/08/02