Post XML File to a Secure Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
code_chaser
Forum Newbie
Posts: 1
Joined: Thu Feb 19, 2004 3:31 pm

Post XML File to a Secure Server

Post by code_chaser »

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!
Post Reply