Click to See Complete Forum and Search --> : HTTP POST request


bradleybebad
08-09-2010, 04:09 PM
Could someone point me in the right direction to a solution for my problem? I have an xml document that I need to POST to an external URL.

The directions from my client provided:

Use Standard Response Mode – In this mode we will save the information posted and then queue it for posting to our partners. The response you will receive indicates only if the lead was saved and will convey nothing about the status of the lead.

The post processor accepts HTTP POST and HTTP GET requests made to the following URL:
Standard Response Mode URL: Protocol://laprotocol.com/xml/

The Sample XML Document they gave me:
<?xml version="1.0" ?>
<!DOCTYPE LeadPostResponse (View Source for full doctype...)>
<LeadPostResponse>
<Parsed>1</Parsed>
<LaprotocolID>538BBBBD-C266-4B44-8B00-000000C00C80</LaprotocolID>

<Debug>
<PostingClientIP>192.68.0.1</PostingClientIP>
<PostingClientType>MSIE6.0</PostingClientType>
<ErrorCount>0</ErrorCount>
<MissingCount>0</MissingCount>
<SSLRequired>0</SSLRequired>
<SSLUsed>0</SSLUsed>

<PublisherApprovedForRealtime>1</PublisherApprovedForRealtime>
<PostingURL>http://laprotocol.com/xml</PostingURL>
<DataSent>
<Field>
<name>FirstName</name>
<value>John</value>
</Field>
<Field>
<name>LastName</name>
<value>Smith</value>
</Field>
</DataSent>
</Debug>
<Messages></Messages>
</LeadPostResponse>


Basically, there is an html form that POST values to a php page and then these values are put into variables that are sent to an xml document which needs to be posted to an external URL. I know that probably doesn't make much sense, but it is the best I can do because of my lack of knowledge in xml and everything else :)

So with the xml example above, would I put php variables in the values?

<Field>
<name>FirstName</name>
<value>$fn</value>
</Field>