n1concepts Posted December 22, 2011 Share Posted December 22, 2011 Hi, I'm trying to setup a quick PHP script that will grab the email from the url (see below) and after inserting into MySQL db - which is working fine - the script will complete two additional tasks: 1. send that same captured email out to a external db as in shown via http://domain1.com/insert.php?email=$lead (example), but then send to a DIFFERENT source - the originator of the lead - a portback acknowledgement using Header (sending the status and email to http://domain2.com/check.php?e=$lead&s=$status for their records). See the code below: ------------------------- $lead = $_REQUEST['e_mail']; // will grab email from posted url string and assign to local variable $result = mysql_query($command); // this is just to execute the MySQL insert which works just fine but included here to explain validation below // Create API Call string to insert lead into iContact folder $requestURL = "http://domain1.com/insert.php?email=$lead"; // Execute API Call to CAKE $xml = simplexml_load_file($requestURL) or die("feed not loading"); if ($result) { $status = 1; // mark lead as sucess // send postback on lead status header("Location: http://domain2.com/check.php?e=$lead&s=$status"); } -------- Problem: I'm getting all sorts of errors with the simplexml_load_file() function and can't figure out why it won't work. Any input appreciated as this the only way I know how to pass the lead onward and then inform/update the other party of receipt of information. thx! Link to comment https://forums.phpfreaks.com/topic/253705-need-method-to-send-captured-lead-to-external-source-then-send-post-back-receipt/ Share on other sites More sharing options...
n1concepts Posted December 22, 2011 Author Share Posted December 22, 2011 FYI: I figured it out - just using cURL (SOAP works too...) Link to comment https://forums.phpfreaks.com/topic/253705-need-method-to-send-captured-lead-to-external-source-then-send-post-back-receipt/#findComment-1300604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.