You simply create custom forms and bind to the MailChimp API, but by the last update you will need to make sure that you have administrator rights.
You include (require) the MCAPI.class.php and config.inc.php files from their API loading , and then write your process (I use PHP ).
Once you have downloaded the files and configured your config.inc.php file with the appropriate credentials (API key and list ID), you are ready to go.
Here's a sample in PHP that subscribes the user to a list, but you will need to read the API docs to get the exact functionality you are looking for.
<?php session_start(); // --- Sample fields - depends on your list $mailChimpTIME = date('Ymd H:i:s'); $mailChimpFirstName = // First Name $mailChimpLastName = // Last Name $mailChimpEmailAddress = // Email Address require_once 'MCAPI.class.php'; require_once 'config.inc.php'; //contains apikey $api = new MCAPI($apikey); $merge_vars = array( 'FNAME'=>$mailChimpFirstName, 'LNAME'=>$mailChimpLastName, 'EMAIL'=>$mailChimpEmailAddress, 'OPTIN_IP'=>$_SERVER['REMOTE_ADDR'], 'OPTIN_TIME'=>$mailChimpTIME ); $email_type = 'html'; $double_optin = true; $update_existing = true; $replace_interests = false; // By default this sends a confirmation email - you will not see new members // until the link contained in it is clicked! $retval = $api->listSubscribe( $listId, $mailChimpEmailAddress, $merge_vars, $email_type, $double_optin, $update_existing, $replace_interests); if ($api->errorCode){ echo "Unable to load listSubscribe()!\n"; echo "\tCode=".$api->errorCode."\n"; echo "\tMsg=".$api->errorMessage."\n"; } else { // Success //echo "Subscribed - look for the confirmation email!\n"; } ?>
source share