Hi guys,
I'm completely new to both PHP and XML and was wondering if
someone could help me to post an XML file via HTTP?
I will be posting to an outside server that would in turn respond
with codes like: 1 for OK, 2 for PENDING and 3 for DENIED.
The file contents are as follows:
file: request.xml
<?xml version="1.0" ?>
<request version="1.0" id="REQUEST-123456">
<store id="987654321">
<password>secret</password>
<plan-id>7</plan-id>
</store>
<add-product 0001="jello">
<password>secret</password>
<organization>Organization</organization>
<contact type="admin">
<first-name>John</first-name>
<last-name>Doe</last-name>
<organization>Organization</organization>
<address>
<street>1 Beverly Hills Rd.</street>
<city>Beverly Hills</city>
<state>CA</state>
<postalcode>90210</postalcode>
<country>USA</country>
</address>
<voice>+1 (888) 555-5555</voice>
<email>sales@store.com</email>
</contact>
</add-product>
<modify-product 0002="jelly beans">
<password>secret</password>
</modify-product>
<delete-product 0003="couch potatoe">
<password>secret</password>
</delete-product>
</request>
I have no clue on how to post this to a server. I have installed
Curl to see if it's easier to implement with. Code samples would
be appreciated. I have seen some code on forum while searching
but am unable to use them without further instruction.
Thanks
LCP