カスタム検索の検索結果の件数を表示する

$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


02/08 人間の愚かさを教えてくれる『フランケンシュタインの誘惑』が好きすぎる

はじめてこのサイトに来た方への案内所はこちら

類似記事

Copy&Paste


本文のコピペやスクショはしないでください