RE: php create new contact code not working for me
The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.
It's not putting the contact into any of the lists, awaiting confirmation, nothing anywhere that I can find. I ran it from two different servers.
I would at least expect some response from cURL:
// 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, 0); // 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);
Does this code require PHP 5?
We are running PHP Version 4.3.11
The readme I just downloaded says "first make
sure that you have php5 enabled within your web server".
Do you have an API that works for PHP 4x?
firstname.lastname@example.org working for vestsbycharlotte.com
Is there a line of code that is a PHP 4 equivalent?
I have been working on these forms for a while and I think that this is the problem i am running into. The servers I am using have 4.4.4 and 4.4.8 respectively for PHP. Anyway, any help on this would be great! Thanks all!
I was referring to the curl_setopt() function which takes care of the entire authentication process and HTTP request process for you. In order to use PHP 4.0 you would have to write the code that does that yourself or use a PHP library created for 4.0. We are not planning on creating any 4.0 examples as PHP no longer supports or updates 4.0 and they are preparing to release 6.0 in the near future.
Dave Berard Senior Product Manager, Constant Contact