Answer the question
In order to leave comments, you need to log in
How to get list of mailchimp sheet via API?
Friends, does anyone know how to get the list of members of the (3552adc0ce) mailchimp list?
include( 'mailchimp/Mailchimp.php' );
$apiKey = 'ЗДЕСЬ КЛЮЧ';
result = $MailChimp->get('lists/{3552adc0ce}/members', array('id' => '3552adc0ce',));
print_r($result);
include_once( 'mailchimp/Mailchimp.php' );
include_once( 'mailchimp/Mailchimp/Lists.php');
$apikey = 'КЛЮЧЕГ';
$list_id = '3552adc0ce';
$url = 'https://us13.api.mailchimp.com/2.0/lists/members?apikey='.$apikey.'&id='.$list_id;
$chunk_size = 4096; //in bytes
$json = file_get_contents($url);
$obj = json_decode($json, true);
echo '<table border="1"><tr><td>Id</td><td>Почта</td></tr>';
foreach($obj['data'] as $filter2) {
echo '<tr><td>' . $filter2['id'] . '</a></td><td>' . $filter2['email'] . '</td></tr>';
}
echo '</table>';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question