1. Go to this page and download the library: Download jhut89/mailchimp3php 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/ */
jhut89 / mailchimp3php example snippets
composer
use MailchimpAPI\Mailchimp;
$mailchimp = new Mailchimp('123abc123abc123abc123abc-us0');
$client_id = '12345676543';
$redirect_url = 'https://www.some-domain.com/callback_file.php';
// state information encoded into a string to be f36POk6yJV_adQssw5c';
Mailchimp::getAuthUrl($client_id, $redirect_url, $state);
$response->deserialize(); // returns a deserialized (to php object) resource returned by API
$response->getHttpCode(); // returns an integer representation of the HTTP response code
$response->getHeaders(); // returns response headers as an array of key => value pairs
$response->getBody(); // return the raw text body of the response