i\'m trying using cURL for a GET request like this:
function connect($id_user){ $ch = curl_init(); $headers = array( \'Accept: application/json\'
you have done it the correct way using
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
but i notice your missing
curl_setopt($ch, CURLOPT_POST,1);