Я пытаюсь получить первые 5 треков из определенного RSS-канала Soundcloud.
Я пробовал:
$rssStack = array();
$xml = new DOMDocument();
$xml->load();
также
simplexml_load_file();
Если вы откроете исходный URL-адрес в браузере, вы увидите элементы itune. Пример: <itunes:image href="https://i1.sndcdn.com/artworks-oLiaE6UFnEJiO3vC-O1mJNg-t3000x3000.jpg"/>
Но когда вы обрабатываете его любым из вышеперечисленных методов, эти элементы отсутствуют.
(
[guid] => tag:soundcloud,2010:tracks/00000
[title] => Special Ep14: Season 4 Finale hghgh
[pubDate] => Fri, 22 May 2020 00:00:00 +0000
[link] => https://soundcloud.com/accountname/special-ep14-finale
[description] => software outsourcing business in the 90s, isn’t the only reason. Over the years, he has built Persistent into a well-oiled machine that continues to survive and keep its focus intact, sometimes doggedly.
[enclosure] => SimpleXMLElement Object
(
[@attributes] => Array
(
[type] => audio/mpeg
[url] => https://feeds.soundcloud.com/stream/0xxx0.mp3
[length] => 75804211
)
)
)
Как получить все элементы xml в массиве с помощью PHP?