Jump to content

Need method to send captured lead to external source then send post back receipt


n1concepts

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.