Web検索APIがあちこち提供終了しているのでbingのAPIを試す 簡易メモ
<?php $key = "APIキー"; $word = "検索文字列"; $url = "https://api.datamarket.azure.com/Bing/Search/Web" . "?Query=" . urlencode("'" . $word . "'") . '&$format=json'; $options = array( "http" => array( "request_fulluri" => true, "header" => "Authorization: Basic " . base64_encode($key . ":" . $key) ) ); $context = stream_context_create($options); $response = @file_get_contents($url, false, $context); $ret = json_decode($response, true); print_r($ret["d"]["results"]); ?>