Website Registration is no longer updating the general list contact list as 0f Nov 25th for


Website Registration is no longer updating the general list contact list as 0f Nov 25th for

I recently noticed that all the people that registered after Nov 25th on my site are no longer being updated on the list.  I spoke to my site designer about it and here is his response: (subject:

 I suspect there might be a change at Constant Contact in the way these things are processed.  If you check with them first and gather as much information as you can for me, it could save time and money in getting the code updated.  Once we have the names adding automatically again as before, then I can go into the database, retrieve the missing ones and add them to your list.  If I do it now, I'll have to do it all over again after we get the code updated.


Below is the code used to update the list.  It hasn't changed since we started.  You can provide the code to Constant Contact support in case they have questions about what method you are using:





$first_name = ($_GET);

$middle_name = ($_GET);

$last_name = ($_GET);

$email = ($_GET);

$phone = $_GET;


/////////// REGISTER EMAIL WITH CONSTANT CONTACT ///////////////////


$UN = "bybloscafe";

$PW = "andrew1";

$Key = "0e444086-b395-4a38-9917-ddbf5110fa84";


$entry = '<entry xmlns="">

<title type="text"> </title>

<updated>' . date('c') . '</updated>



<summary type="text">Contact</summary>

<content type="application/vnd.ctct+xml">

<Contact xmlns="">

<EmailAddress>' . $email . '</EmailAddress>

<FirstName>' . $first_name . '</FirstName>

<MiddleName>' . $middle_name . '</MiddleName>

<LastName>' . $last_name . '</LastName>

<HomePhone>' . $phone . '</HomePhone>



<ContactList id="' . $UN . '/lists/1" />' // Do this for all the lists you want to add to

// Be sure to get the correct list number(s) for your list(s)

. '</ContactLists>





// Initialize the cURL session

$request ="" . $UN . "/contacts";

$session = curl_init($request);


// Set up digest authentication

$userNamePassword = $Key . '%' . $UN . ':' . $PW ;


// Set cURL options


curl_setopt($session, CURLOPT_USERPWD, $userNamePassword);

curl_setopt($session, CURLOPT_POST, 1);

curl_setopt($session, CURLOPT_POSTFIELDS , $entry);

curl_setopt($session, CURLOPT_HTTPHEADER, Array("Content-Type:application/atom+xml"));

curl_setopt($session, CURLOPT_HEADER, false); // Do not return headers

curl_setopt($session, CURLOPT_RETURNTRANSFER, 1); // If you set this to 0, it will take you to a page with the http response


// Execute cURL session and close it

$response = curl_exec($session);



////////////////// END REGISTER EMAIL WITH CONSTANT CONTACT ///////////////////////


// Your code goes here: typically sending a confirmation email, and/or a Header("Location: your_page.php") redirect






Please help and copy Chad at





Chad Phillips


Hi Chad,


Sorry for the problems here but it looks like your code should not have been working since around June of 2009 when we made a change to our Authentication model for the API.  This change was intended to increase security of your information and we sent out multiple notices to all of our API users and registered developers.  You can find information to pass on to your developer on how to fix this PHP script here.  The changes are very simple and are explained in that topic in detail.  I would recommend having your developer go back all the way to June of 2009 to make sure you are not missing contacts from than.

Dave Berard
Senior Product Manager, Constant Contact

Chad + Roger,


You may also want to reference this post ( explaining the changes that must be done to your script.


These instructions were written to assist in updating our old sample code so the line numbers may not be the same however the options that must be changed do correlate to your script.

Dan H

Support Engineer, Constant Contact

Developer Portal

View API documentation, code samples, get your API key.

Visit Page