cancel
Showing results for 
Search instead for 
Did you mean: 

Sample PHP code for API

All Star

Sample PHP code for API

Hi.

 

Ive looked for sample PHP code to call the API to do things like create,modify,delete contacts etc, and I am poitned to sites like github but there seems to be a lot of php code that can't be found - eg. references to include files etc.

 

Is there any one location where zip files containing all the necessary code for all the different types of API calls one would want to make to access our existing constant contact DB?

 

Any help appreciated.

2 REPLIES 2
Honored Contributor

Re: Sample PHP code for API

Hello,

 

What your'e running into is that the PHP library has two dependencies that are managed using Composer (You can find information on Composer here: https://getcomposer.org/doc/00-intro.md). If you're not familiar with Composer or are simply not using it to manage your project, you can simply download the dependencies by installing composer and then opening a terminal/command prompt and navigating to the folder where you placed the PHP SDK. Once you're in that folder simply type "composer install" into the command line and everything will be downloaded.

 

Once you've got the dependencies, you can then just copy the contents of the PHP SDK folder and it will have everything that you need.

 

If you have any questions, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer
Highlighted
All Star

Re: Sample PHP code for API

Thanks Elijah

 

I'll take a look at what you've said.

 

Appreciate your help.

 

Cheers

RLTC Cam