Alejandra_Gutierrez1d
Hello, sorry for the question but I don’t know how to do, I have a membership site and I have a http post in a campaign, when a specific tag is added to a contact, start a sequences with a http post, and I don’t know if like my URL above is that I receive from Infusionsoft because any user is create in my membership site, and also I tried to send the HTTP post to my php file that contain this code and doesnt’ work, can you please help?:
<?php
// the post URL
$postURL = 'https://mywebsite.com/index.php/register/KYTujg';
// the Secret Key
$secretKey = 'NYekoxaj389';
// prepare the data
$data = array ();
$data['cmd'] = 'CREATE';
$data['transaction_id'] = '837684';
$data['lastname'] = $_GET['lastname'];
$data['firstname'] = $_GET['firstname'];
$data['email'] = $_GET['email'];
$data['level'] = '374538';
// generate the hash
$delimiteddata = strtoupper (implode ('|', $data));
$hash = md5 ($data['cmd'] . '__' . $secretKey . '__' . $delimiteddata);
// include the hash to the data to be sent
$data['hash'] = $hash;
// send data to post URL
$ch = curl_init ($postURL);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returnValue = curl_exec ($ch);
// process return value
list ($cmd, $url) = explode ("\n", $returnValue);
// check if the returned command is the same as what we passed
if ($cmd == 'CREATE') {
header ('Location:' . $url);
exit; } else {
die ('Eror al crear usuario');
}
?>