CampaignMonitor's details campaigns with Feed RSS

I'd like to know if is possible create a xml feed rss with a campaignmonitor's campaign; now, if I use below address the system send me password and username request but rss reader (for example feedburner) accept only without authentication:
http://api.createsend.com/api/v3/campaigns/{ID}/summary.xml

Any ideas?

With API I have more problems and not found examples to create an xml file.

JonJoyce, 5 years ago

Make the API call from your server with the correct authentication, then simply loop through your returned XML and create your RSS feed xml structure and output that through a page on your site (www.mysite.com/rss.php/cfm)

Check the Example on wikipedia for RSS/XML structure: http://en.wikipedia.org/wiki/RSS


Jonathon Joyce

http://www.jonathonjoyce.co.uk/projects/campaign-monitor-cfc/
http://campaignmonitorcfc.riaforge.org/
michele, 5 years ago

Ok, I have found the solution:

<?php
 
$username = "";
$password = "";
$CMHost = "http://api.createsend.com/api/v3/campaigns/{ID}/summary.xml";
$curl;
 
$curl = curl_init();
 
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($curl, CURLOPT_URL, $CMHost);
 
$result = curl_exec($curl);
curl_close($curl);
 
header('Content-Type: application/xml; charset=UTF-8');
 
print $result;
 
?>

I'd like that CampaignMonitor create a Tutorial/Video section, with more examples and information...

tobyb tobyb, 5 years ago

Hi michele,

Much of the basic information about consuming the API is contained in the 'Getting Started' section of the documentation. We've also created wrappers in some major languages to make it easier to get up and running which are detailed here. The PHP wrapper has examples for all resources available through the api. Hopefully those samples should help with any future API use.

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098