error_reporting(0); error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); ini_set('display_errors', '1'); /* $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $s = curl_exec($ch); if ($s == false) print_r( curl_error($ch) ); curl_close($ch); */ $s = file_get_contents('http://localhost:9200/user/_doc/1'); echo "
"; print_r(json_decode($s,true)); echo "
"; echo "done"; ?>