Archive on website - PHP example

Posted by Jeff Rasmussen. Last updated: Fri, Oct 11, 2013

Ubivox has a number of feed options, which can be used to fetch data to your website. An example is a feed containing archived newsletters. Below is an example of what to do.

<?php
// Edit these constants, to match your account
define('URL', 'https://ubivox.clients.ubivox.com');
define('LISTID', '402');

$archive_url = URL.'/feeds/archived_deliveries_list/json/list_id='.LISTID.'/';

$json = file_get_contents($archive_url);
$newsletters = json_decode($json, true);

foreach ($newsletters as $newsletter) { 
   print '<table width="100%>';
   print '<tr>';
   print '<td><a href="'.$newsletter['url'].'">'.utf8_decode($newsletter['subject']).'</a></td>';
   print '<td>'.date('d/m/Y', strtotime($newsletter['send_time'])).'</td>';
   print '</tr>';
   print '</table>';

What next?

Read more articles on these subjects: Archive, Integration

Keywords

See other articles with these keywords:


Languages

See this article in:


About the author

Jeff Rasmussen
Communications Officer

Adept at strategic communication, especially external. Handles the Ubivox LinkedIn profile and marketing campaigns.


Further questions

Do not hesitate to contact us if you have any questions.

Start livechat
Write e-mail


Get in touch if you want to try Ubivox -
send us an e-mail at support@ubivox.com.