Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
XML push to PopCard
function submit_contact_reserve_lead($entry){
$date = date('Y-m-d\TH:i');
$baseURL = 'http://interface.webservices.popcard.ltsolutions.com/service.asmx/InsertTraffic?strRequestXML=';
$xmlRequest = '
<traffic contactdatetime="' . $date . ':00" transactiondatetime="' . $date . ':00">
<trafficsource>
<vendorid>28e30c94-b263-49c5-b190-551d12d8a1de</vendorid>
<emailaddress>Laurel006@myLTSMail.com</emailaddress>
<propertyname>The Laurel</propertyname>
</trafficsource>
<prospect>
<firstname>' . $entry['1.3'] . '</firstname>
<middlename></middlename>
<lastname>' . $entry['1.6'] . '</lastname>
<streetaddress1></streetaddress1>
<streetaddress2></streetaddress2>
<city></city>
<state></state>
<zipcode></zipcode>
<daytimephone></daytimephone>
<eveningphone></eveningphone>
<cellphone></cellphone>
<otherphone>' . $entry['3'] . '</otherphone>
<emailaddress>' . $entry['2'] . '</emailaddress>
<comments>Interested in: ' . $entry['4'] . '<br> How can we help you: ' . $entry['5'] . '</comments>
</prospect>
<prospectpreferences></prospectpreferences>
</traffic>';
$xmlRequest = preg_replace( "/\r|\n/", "", $xmlRequest );
$string = trim($xmlRequest);
$result = curl_get( $baseURL . urlencode($string));
error_log('| Contact/Reserve Submission for ' . $entry['1.3'].' - ' . $entry['1.6']);
error_log($result);
error_log($baseURL . urlencode($string));
error_log($date);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.