Jump to content

sending xml with php


defeated

Recommended Posts

Helllllppp. How do I send form details to another site in xml format?  I have a job site that has it's own db and I can post jobs by using a form to send to my own db.... but now I need to send the details of that form to multiple other sites too. .... and I'm stuck!  I have a java solution but I don't understand any of it. .... to the extent that I can't tell what is the address I need to sent to.

Here is the code....

var httpOb = new ActiveXObject("Msxml2.XMLHTTP");

if Preview
{
     httpOb.open("POST","AddVPrv_XML.asp", false);
}

if Upload
{
     httpOb.open("POST","AddV2_XML.asp", false);
}

var TransactionObj = Transaction.XMLDocument.documentElement;

httpOb.send(Transaction.XMLDocument);

if(httpOb.status==200)
//     If successful by the object itself.
{
     alert(httpOb.responseXML.xml);
     //  Alert back the return XML.
}

 

Did i mention that i hate javascript (mainly because I haven't learnt it yet).

I take it that the code above would give me a preview of what I sent and then upload it and then send me back a response.

I have no idea how to implement it though and would far rather use php.

All help greatly appreciated!

Ian.

Link to comment
https://forums.phpfreaks.com/topic/111876-sending-xml-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.