$host="127.0.0.1";
$ch = curl_init();
$headers = array(
'Connection: keep-alive',
'User-Agent: PHP-SOAP-CURL',
'Content-Type: application/json; charset=utf-8',
'Accept: application/json',
'Content-Length: ' . strlen($data_string),
'Host '.$host);
curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
you can add header field as many you need in array as above
http://php.net/manual/en/function.curl-setopt.php