I am using curl to post XML to a webservice. The code is below:
exec("/usr/bin/curl -s -m 120 -d \"$xml\" $URL -L", $return_message_array, $return_number);
I want to add this custom header to it:
$headers = array(
"Content-type: application/soap+xml; charset=utf-8",
"SOAPAction: http://loantree.com/webservices/InsertLead",
);
I have tried:
exec("/usr/bin/curl -s -m 120 -H $headers -d \"$xml\" $URL -L", $return_message_array, $return_number);
But that just returns the page I'm trying to post to. Does anyone know how I can achieve this?