当我尝试在纯PHP中使用Shodan API并使用curl进行搜索时,没有任何反应。 我的PHP代码与curl:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.shodan.io/shodan/host/search?key=myapikey&query=apache&facets={}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$do = curl_exec($ch);
$do1 = json_decode($do,true);
curl_close($ch);
print_r($do1);
}