.+<\/p>/", "", $text ); }; $formatDate = function($locale,$date) { $fmt = new \IntlDateFormatter($locale, null, null); $fmt->setPattern('d MMMM yyyy HH:mm'); $dateTimeCFF = DateTime::createFromFormat( DateTime::RFC7231, $date ); return $fmt->format($dateTimeCFF); }; $formatAudioData = function($rawAudioData) { return "controls=true". " src={$rawAudioData->url}". " type={$rawAudioData->type}". " length={$rawAudioData->length}"; }; $data = file_get_contents( "https://feeds.acast.com/public/shows/le-plus-beau-des-voyages" ); $xml = simplexml_load_string($data,'SimpleXMLElement', LIBXML_NOCDATA); $podcast = (object) [ "title" => ucfirst( strtolower($xml->channel->title) ), "description" => $removeAcastBranding( $xml->channel->description ), "latestEpTitle" => $xml->channel->item[0]->title, "latestEpPublicationDate" => $formatDate( "fr_FR",$xml->channel->item[0]->pubDate ), "latestEpDescription" => $removeAcastBranding( $xml->channel->item[0]->description ), "latestEpAudioData" => $formatAudioData($xml->channel->item[0]->enclosure->attributes()) ]; ?>
animé par Pauline
description ?>