如何获取每个列表订阅状态的 Mailchimp 成员信息?
$mailChimp = new MCAPI($this->api_key);
$listid = 'xxxxxxxxxx';
$retval = $mailChimp->listMemberInfo( $listid, 'yourname@gmail.com' );
if ($this->_mailChimp->errorCode) {
$error['Code'] = $this->_mailChimp->errorCode;
$error['Message'] = $this->_mailChimp->errorMessage;
return $error;
}
print_r($retval);
返回数组:
Array
(
[id] => xxxxxxxxxx
[email] => yourname@gmail.com
[email_type]=> html
[ip_opt] => xxx.xxx.xxx.xxx
[ip_signup] =>
[member_rating] => 2
[info_changed] => 2013-09-23 12:08:28
[web_id] => xxxxxxxx
[merges] => Array
(
[EMAIL] => yourname@gmail.com
[MERGE0] => yourname@gmail.com
[FNAME] => Firstname
[MERGE1] => Firstname
[LNAME] => Lastname
[MERGE2] => Lastname
)
[status] => unsubscribed
[timestamp] => 2013-09-23 12:08:28
[lists] => Array
(
[xxxxxxxxxx] => subscribed
[xxxxxxxxxx] => subscribed
[xxxxxxxxxx] => subscribed
)
)
但是在这里我不知道如何检查我订阅了哪些列表以及哪些未订阅。因为
[lists] => Array
(
[xxxxxxxxxx] => subscribed
[xxxxxxxxxx] => subscribed
[xxxxxxxxxx] => subscribed
)
这里所有的列表都与我使用的原始列表 ID 获取列表不匹配
lists()
Mailchimp的方法
$retval = $mailChimp->lists();
任何人都可以知道如何检查my email id: 'yourname@gmail.com'
已订阅此列表并取消订阅此列表。
我想知道每个列表的状态给定List_ID and Email_ID
我使用 PHP 作为技术。