My Favorite MailChimp PHP Wrapper - API Integration

The MailChimp PHP API Written by Drew McLellan is one of the most simple API out there. How to Add Emails to MailChimp List with PHP.

My favorite MailChimp PHP Wrapper is simple. This API wrapper was written by Drew McLellan. I will go on some brief instructions on how to use the API wrapper. Here is the Documentation for the API Wrapper. 

GETTING STARTED

First you need to get your API Key and List ID

Navigate to User Dropdown -> Account. Then Navigate to Extras -> API Keys. There you can create a key. 

After that you will need to go to the List Menu Item -> Select List -> Settings -> List Names and Default -> On the right side you will see the List ID.

HOW TO ADD EMAIL TO LIST

<?php
$MailChimp = new DrewmMailChimp('abc123abc123abc123abc123abc123-us1');
$result = $MailChimp->call('lists/subscribe', array(
                'id'                => 'b1234346',
                'email'             => array('email'=>'davy@example.com'),
                'merge_vars'        => array('FNAME'=>'Davy', 'LNAME'=>'Jones'),
                'double_optin'      => false,
                'update_existing'   => true,
                'replace_interests' => false,
                'send_welcome'      => false,
            ));
print_r($result);
?>

Enjoy!