This is how I integrated the registration with Mad Mimi using their free API.
When someone registers I use the following code to post the new user email to a mailing list managed by Mad Mimi.
I have the registration redirect adding ?m=1 to the end of my URL which I use to add the user only once as they’ll never see that again.
<?php
global $SESS;
$uid = $SESS->userdata['member_id'];
if($_GET['m']){
$username = 'YOUR EMAIL ADDRESS';
$api_key = 'YOUR API KEY';
$mimiE = $SESS->userdata['email'];
$mimiN = $SESS->userdata['screen_name'];
$csv_data = "name,email,add_list\n.".$mimiN.",".$mimiE.",LIST NAME";
$ch = curl_init('http://madmimi.com/audience_members');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS,
'username='.$username.'&api;_key='.$api_key.'&csv;_file='.$csv_data);
$response = curl_exec($ch);
// TESTING
//echo $response;
}
?>