Showing results for 
Search instead for 
Did you mean: 
You deserve the best.
Beginning Saturday 2/15 we will be upgrading our phone system to ensure we are providing you with the best possible experience.
Due to this upgrade, we will be limited to Chat support only on Saturday from 10-8 pm ET.
On Monday, President's Day, we plan to have both Chat and Phone support available from 10-6 pm ET on the new system.
Thank you for your patience while we make these important updates.

Edit Subscriber problems

CTCT Employee

Email Address...

This issue was resolved over the weekend and so you should be able to send your code. Please remember to Zip the files so that the code does not get modified upon send.

Dan H

Support Engineer, Constant Contact

Occasional Participant

Sent my code


I sent my code a few days ago and have not heard back,

just want to make sure that you got it.




Occasional Participant

Hey i have the similar

Hey i have the similar problem.

and yes it has the problem what Leora mention above.

I also want to update the status of the contact and i was trying with sample provided on this site.

but the page got hang on.

Any help from the API provider will be thankful.




CTCT Employee

Hello,   I apologize for the



I apologize for the delay in response. It sounds like this may be a server configuration issue similar to what the other forum member was experiencing.


I will respond to your email that you submitted earlier today. If you would please respond to that email by attaching a copy of your php.ini file so that I can verify if your settings are correct.


Our sample forms work with the default instillation of PHP found on most servers however certain settings may affect its functionality.


Thank you for your patience.

Dan H

Support Engineer, Constant Contact

Occasional Participant

Require Server Configuration

I checked this sample on different server and the issue is same.

But the strange thing is it is working fine with my local server.

So i think the problem is only with some configuration.

Can you give me the exact configuration required for this sample to run perfactly.

I have PHP5 + CURL extention is on as i also run some other functionality working fine with CURL.

Any help will be greatly appreciated.

and it seems the issue is with this block, other then this everything is working fine

case 'PUT':


                    $tmpfile = tmpfile();

                    fwrite($tmpfile, $parameter);

                    fseek($tmpfile, 0);

                    curl_setopt($ch, CURLOPT_INFILE, $tmpfile);

                    curl_setopt($ch, CURLOPT_PUT, 1);

                    curl_setopt($ch, CURLOPT_INFILESIZE, strlen($parameter));





also its working fine upto this break statement , but when i ececute this CURL then it got hangs.







CTCT Employee

I appreciate you taking the

I appreciate you taking the time to test this on another server. Aside from the known basic requirements of PHP5 and the cURL library, we do not have a list of specific requirements for the PHP sample.


This sample was developed with the intent of showing people what is possible with the API and providing a starting point for development. I will continue to test and see what may be preventing the PUT method from working however our resources our limited in testing each possible configuration. We provide these samples as-is and cannot guarantee that they will work in all systems. I am curious enough to want to figure this issue out however you may need to look elsewhere for support related to your configuration.


Thank you for your understanding.

Dan H

Support Engineer, Constant Contact

Occasional Participant

Bulk Update

I thank you very much for your support .

I just got it working now on my server with other sample that i found on internet.

So i can say there is something wrong with the code itself, may be CURL funciton is the cause of the problem.


i use <code>


        curl_setopt($ch, CURLOPT_URL, $url);

        curl_setopt($ch, CURLOPT_USERPWD,  $credentials);

        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

        curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);

        curl_setopt($ch, CURLOPT_TIMEOUT, 30);

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);



            if ($this->debug == 'cli')

                $this->debug_print("And Posting:\n\n---START---\n".$post."\n---END---\n\n");

            elseif ($this->debug == 'html')

                $this->debug_print("And Posting:<pre>\n\n---START---\n".htmlspecialchars($post)."\n---END---\n\n</pre>");

            if ($call_type == 'PUT')

                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');

            elseif ($call_type == 'DELETE')

                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');


                curl_setopt($ch, CURLOPT_POST, 1);


            curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/atom+xml'));




            $this->debug_print("Not posting");

            curl_setopt($ch, CURLOPT_POST, 0);

            if ($call_type == 'PUT')

                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');

            elseif ($call_type == 'DELETE')

                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');



        curl_setopt($ch, CURLOPT_HEADER, 0);


        $response = curl_exec($ch);


okay so my issue is solved.



but i need your suggestation for bulk addition and updation of contacts.

i come to know that it is possible to add and remove contact in Bulk using "Activity",

but i have gone th' docs and forum and it seems that there is no facility for bulk updation.

Any suggestation how can i go for bulk updation.

I have more than 1000 contacts and it may be more in future.


really need suggestation.

my only goal is to update status of contacts according to my site database only.







CTCT Employee

I am glad to hear that you

I am glad to hear that you have found a resolution for this issue. I am curious to see what version of cURL you have installed that was causing the PUT to hang.

I am going to see if using the CUSTOMREQUEST parameter will work on all systems and should be implemented into the sample form or if it should just be provided as a workaround.

As far as your questions about synchronization. When requesting contact data from Constant Contact you should use the 'Last Updated Date' query method explained in detail here: In short, this will allow you to pull a list of contacts who have been updated since a certain date which is great for a scheduled script. Once you have the list and have compared with your data you can then build a BULK activity and update the lot of them at once. Information on constructing this request can be found here:

This should be all you need to start building a synchronization utility.

Dan H

Support Engineer, Constant Contact