Can PHP (with curl) post an XML file to a secure server like Microsoft XML 4.0? We would much prefer to use PHP to do this. We have used PHP and curl to post XML data to a secure server, but that experience does not seem to be helping us now. Below is some VB6 code that supposedly does the job; is there a PHP equivalent?
Dim objXML As XMLHTTP40
Dim objDoc As DOMDocument40
Set objXML = New XMLHTTP40
objXML.open "PUT", “https://test.com/PostXML/my_xml_file.xml ", False
objXML.setRequestHeader "Translate", "f"
Set objDoc = New DOMDocument40
objDoc.validateOnParse = False
If objDoc.Load("E:\my_xml_files\my_xml_file.xml") Then
objXML.setRequestHeader "Content-Type", "text/xml"
objXML.send objDoc.xml
Debug.Print objXML.statusText
End If
We hope that someone can help us with this issue; we've spent hours scouring the net for the answer to this and have come up empty so far. Thanks in advance for any help you can give!