PHP and mailchimp integration

Soldato
Joined
18 Oct 2002
Posts
7,614
Location
Sutton Coldfield, Birmingham
Basically i'm after help with integrating my current website with mailchimp for the email tracking and statistics etc.

I already have a basic contact form, users list (where users can edit their information) and potentially a mailing list too which will send users emails from the website automatically with new property lists, etc.

I've read a bit about the API but i'm a bit lost at the moment.

I've worked with JSON before but basically does anybody have any good "dummy" pointers to get me started?
 
Associate
Joined
4 Feb 2011
Posts
580
Location
Halifax
I've worked with MailChimp's API before, but it was a good year ago.

They have their own PHP library, which is pretty simple to use. Just clone the repo or install with composer.

If you're working without a framework, it's pretty much require away (I had a basic wrapper with CodeIgniter).

PHP:
require './src/MailChimp.php';

$mc = new MailChimp('APIKeyHere');

$lists = $mc->lists->getList();

They also have some basic integration examples on their GitHub.

I've worked with JSON before but basically does anybody have any good "dummy" pointers to get me started?

If you use the library, it should handle all JSON => Array/Object conversions for you.
 
Last edited:
Back
Top Bottom