PHP code example of gufy / mailchimp

1. Go to this page and download the library: Download gufy/mailchimp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gufy / mailchimp example snippets



use Gufy\Mailchimp\Mailchimp;
$mailchimp =  new Mailchimp($username, $api_key); // change $username and $api_key with your credential

$lists = $mailchimp->get('lists');

$create_list = $mailchimp->post('lists', $parameters);