accidentcar
New Member
Using the following link I got RSS feed for videos
http://rss.cnn.com/services/podcasting/ac360/rss.xmlI need to fetch this link and show video on my site using DOMDocument() in PHP.
How to fetch these videos from RSS feed and show on my site ?
Here is my code \[code\]$xml=("rss.cnn.com/services/podcasting/ac360/rss.xml";$xmlDoc = new DOMDocument();$xmlDoc->load($xml); $channel=$xmlDoc->getElementsByTagName('channel')->item(0); for ($i=0; $i<=2; $i++) { $item_title=$x->item($i) ->getElementsByTagName('title') ->item(0) ->childNodes ->it??em(0) ->nodeValue; $item_link=$x->item($i) ->getElementsByTagName('link') ->item(0) ->childNodes ->item??(0) ->nodeValue; $item_desc=$x->item($i) ->getElementsByTagName('description') ->item(0) ->childNode??s ->item(0) ->nodeValue; echo ("<p><a href='" . $item_link. "'>" . $item_title . "</a>");}\[/code\]
http://rss.cnn.com/services/podcasting/ac360/rss.xmlI need to fetch this link and show video on my site using DOMDocument() in PHP.
How to fetch these videos from RSS feed and show on my site ?
Here is my code \[code\]$xml=("rss.cnn.com/services/podcasting/ac360/rss.xml";$xmlDoc = new DOMDocument();$xmlDoc->load($xml); $channel=$xmlDoc->getElementsByTagName('channel')->item(0); for ($i=0; $i<=2; $i++) { $item_title=$x->item($i) ->getElementsByTagName('title') ->item(0) ->childNodes ->it??em(0) ->nodeValue; $item_link=$x->item($i) ->getElementsByTagName('link') ->item(0) ->childNodes ->item??(0) ->nodeValue; $item_desc=$x->item($i) ->getElementsByTagName('description') ->item(0) ->childNode??s ->item(0) ->nodeValue; echo ("<p><a href='" . $item_link. "'>" . $item_title . "</a>");}\[/code\]