for beinners, please check this example on how to use curl library.
to include headers in response, setĀ CURLOPT_HEADER to 1 in curl options. ie,
curl_setopt_array($ch, array(
...
CURLOPT_HEADER => 1,
...
);
to include headers o… more »