Back to Documentation Overview
listMemberInfo
public static listMemberInfo(string apikey, string id, string email_address)
Get all the information for a particular member of a list
- Section:
- List Related
- Parameters:
apikey a valid API Key for your user account. Get by calling Get by visiting your API dashboard id the list id to connect to. Get by calling lists() email_address the member email address to get information for - Returns:
- array - array of list member info (see Returned Fields for details)
- Returned Fields:
string email The email address associated with this record string email_type The type of emails this customer asked to get: html or text array merges An associative array of all the merge tags and the data for those tags for this email address. Note: Interest Groups are returned as comma delimited strings - if a group name contains a comma, it will be escaped with a backslash. ie, "," => "\," string status The subscription status for this email address, either subscribed, unsubscribed or cleaned string ip_opt IP Address this address opted in from. string ip_signup IP Address this address signed up from. date timestamp The time this email address was added to the list - <?php
- /**
- This Example shows how to pull the Info for a Member of a List using the MCAPI.php
- class and do some basic error checking.
- **/
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $retval = $api->listMemberInfo( $listId, $my_email );
- if ($api->errorCode){
- } else {
- //below is stupid code specific to what is returned
- //Don't actually do something like this.
- foreach($retval as $k=>$v){
- //handle the merges
- foreach($v as $l=>$w){
- }
- } else {
- }
- }
- }
- <?php
- /**
- This Example shows how to retrieve a list subscriber's information using XML-RPC
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.inc.php';
- try {
- $result = $client->listMemberInfo($apikey, $listId, $my_email);
- foreach($result['merges'] as $k=>$v){
- }
- } catch (XML_RPC2_FaultException $e){
- }
Examples (2)
download example code[1] mcapi_listMemberInfo.php
[2] xml-rpc_listMemberInfo.php
|
Add New Note
User Contributed Notes for
listMemberInfo |
|---|
| No notes, yet... Will you be the first?? |