<?php
$api_key = "4b16e4c72873fccd855f438d725d25cf-us10";
$list_id = "f9843b203c";
 
require('Mailchimp.php');
//$Mailchimp = new Mailchimp( $api_key );
/*$Mailchimp_Lists = new Mailchimp_Lists( $Mailchimp );

$subscriber = $Mailchimp_Lists->subscribe( $list_id, array( 'email' => htmlentities($_POST['email']) ) );
 

$mailChimp = $Mailchimp_Lists->get('MailChimp');
$campaign = $mailChimp->getCampaign();
//get all campaigns
print_r($campaign->campaigns());*/
echo '<pre>';
$MailChimp = new MailChimp($api_key);
print_r($MailChimp->call('campaigns/list'));
//$MailChimp = new \Drewm\MailChimp('abc123abc123abc123abc123abc123-us1');
/*$result = $MailChimp->call('lists/subscribe', array(
                'id'                => 'f9843b203c',
                'email'             => array('email'=>'tejasjadhav13@yahoo.com'),
                'merge_vars'        => array('FNAME'=>'tejas', 'LNAME'=>'jadhav'),
                'double_optin'      => false,
                'update_existing'   => true,
                'replace_interests' => false,
                'send_welcome'      => false,
            ));
print_r($result);*/
print_r($MailChimp->call('lists/members', array(
                'id'                => 'f9843b203c'/*,
                'filters'             => array('from_email '=>'tejasjadhav1385@gmail.com')*/
				)));
print_r($MailChimp->call('users/profile', array(
                /*'id'                => 'f9843b203c',*/
                /*'filters'             => array('email '=>'tejasjadhav1385@gmail.com')*/
				)));
print_r($MailChimp->call('lists/member-activity', array(
                'id'                => 'f9843b203c',
                'emails'            => array(array('email'=>'tejasjadhav13@yahoo.com'))
				)));								
				
?>