i tried to using PHP to execute the cURL request and separate curl var_dump output into different variables?but didn't shown anything in php and No errors in PHP logs.
Here is my code:
$url='curl -XGET <my_url>:9200/logstash-index-*/_search?pretty -d \'
{
"size": 0,
"aggs" : {
"langs" : {
"terms" : {
"field" : "name" ,
"size": 0
}
}
}
}\'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$data = ob_get_contents();
ob_end_clean();
var_dump($data);
Thanks for help!