People";
$esendpoint=$_ENV['ES_HOST'];
//echo $esendpoint."/people/_search?q=".$_GET['as_q'];
$ch = curl_init($esendpoint."/people/_search?q=".$_GET['as_q']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
// curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
/* curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($string))
); */
$result = curl_exec($ch);
$response=json_decode($result);
if(isset($response->hits->hits))
{
foreach($response->hits->hits as $hit)
{
$hit=$hit->_source;
echo "
ucid."\" style=\"max-width:50%; margin:auto;\">
ucid."\">".$hit->LastName.", ".$hit->FirstName."";
}
}
echo "
"; print_r($response); echo ""; } endif; ?>