Okay, I've been lurking on WF for a couple weeks now and I hate that my first post is asking for help, but such is life.
I'm writing some scripts to submit leads to LeadPile. I have the form setup to send to itself where it validates the user's information, adds it to my db, then POSTs it to LeadPile and then receives a response from LeadPile in XML format. Here's a sample of the response
The response is stored in $result which I then pass to:
Okay, at this point I know the information is stored in $vals and $index. But how do I get it broken down where the values are stored in variables named after the node?
I'm writing some scripts to submit leads to LeadPile. I have the form setup to send to itself where it validates the user's information, adds it to my db, then POSTs it to LeadPile and then receives a response from LeadPile in XML format. Here's a sample of the response
Code:
<?xml version="1.0"?>
<response>
<status>accept</status>
<id>123456789</id>
<sale>
<price>12.00</price>
<redirect>http://redirect-example.com</redirect>
</sale>
</response>
The response is stored in $result which I then pass to:
PHP:
$parser = xml_parser_create('UTF-8');
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $result, $vals, $index);
Okay, at this point I know the information is stored in $vals and $index. But how do I get it broken down where the values are stored in variables named after the node?