"https://www.radiodiffusionelibera.com/podcast/feed/", 'source' => 'RDL'], ['url' => "https://www.radiocitta105.it/podcast/feed/", 'source' => 'Radio Città 105'] ]; $all_items = []; foreach ($feeds as $feed) { // Caricamento feed con soppressione errori per non bloccare l'intera lista $rss = @simplexml_load_file($feed['url']); if ($rss && isset($rss->channel->item)) { foreach ($rss->channel->item as $item) { $all_items[] = [ 'title' => (string)$item->title, 'link' => (string)$item->link, 'pubDate' => (string)$item->pubDate, 'timestamp' => strtotime((string)$item->pubDate), 'source' => $feed['source'] ]; } } } // Ordinamento cronologico decrescente (i più recenti in alto) usort($all_items, function($a, $b) { return $b['timestamp'] - $a['timestamp']; }); function formatDateItalian($dateString) { try { $date = new DateTime($dateString); $months = [ 'January' => 'Gennaio', 'February' => 'Febbraio', 'March' => 'Marzo', 'April' => 'Aprile', 'May' => 'Maggio', 'June' => 'Giugno', 'July' => 'Luglio', 'August' => 'Agosto', 'September' => 'Settembre', 'October' => 'Ottobre', 'November' => 'Novembre', 'December' => 'Dicembre' ]; $formatted = $date->format('j F Y'); return strtr($formatted, $months); } catch (Exception $e) { return $dateString; } } ?>
Impossibile caricare i podcast al momento. Riprova più tardi.