Send XML content from PHP with POST

This PHP snippet allows you to send an XML string to a SOAP endpoint. This isn’t the only way but it’s the one I prefer. $xml = ‘….your_xml_string….’; $send_context = stream_context_create(array( ‘http’ => array( ‘method’ => ‘POST’, ‘header’ => ‘Content-Type: application/xml’, ‘content’ => $xml )...