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: www.bybloscafe.com)
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:
<?php
$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="http://www.w3.org/2005/Atom">
<title type="text"> </title>
<updated>' . date('c') . '</updated>
<author></author>
<id>data:,none</id>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
<EmailAddress>' . $email . '</EmailAddress>
<FirstName>' . $first_name . '</FirstName>
<MiddleName>' . $middle_name . '</MiddleName>
<LastName>' . $last_name . '</LastName>
<HomePhone>' . $phone . '</HomePhone>
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/' . $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>
</Contact>
</content>
</entry>';
// Initialize the cURL session
$request ="http://api.constantcontact.com/ws/customers/" . $UN . "/contacts";
$session = curl_init($request);
// Set up digest authentication
$userNamePassword = $Key . '%' . $UN . ':' . $PW ;
// Set cURL options
curl_setopt($session, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
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);
curl_close($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
header("Location: http://www.bybloscafe.com/registration_php.php");
?>
Please help and copy Chad at chad@newvibedesign.com
Roger
Chad Phillips
... View more