Subscribers.GetUnsubscribed PHP example

Has anyone got (or could anyone post) an example of using Subscribers.GetUnsubscribed with PHP?  I've gone through the API docs, but it's not making sense for me today!

roshodgekiss roshodgekiss, 7 years ago

Hi Joff, have you checked out the PHP wrapper? I believe there's a file with usage instructions for this method. Otherwise, feel free to post some of your code and we'll get our devs to take a look.

Get in touch with us on Twitter:
We're also on Facebook:
Joff Joff, 7 years ago

Cheers Ros, I've cracked it.

For anyone interested...

//-----------------------------INPUT PARAMS---------------------------------------

$apikey = 'xxxxxxxxxxxxxxxxxxxxxxx';
$list_id = 'xxxxxxxxxxxxxxxxxxxxxxx';    
$date = '2010-10-01 00:00:00';

    $cm = new CampaignMonitor( $apikey );
    //Optional statement to include debugging information in the result
    $cm->debug_level = 1;
    //This is the actual call to the method
    $result = $cm->subscribersGetUnsubscribed( $date, $list_id );
    echo '<br><br>';

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free