synking Posted June 30, 2008 Share Posted June 30, 2008 i am trying to add a google news rss feed to the website i am making. i currently have this code // $location = URL of feed. function load_xml_feed($location) { $feedXml = simplexml_load_file($location); foreach ($feedXml->channel->item as $article) { print '<a href="' . (string)$article->link . '">' . (string)$article->title . '</a><br>'; } } but it does not work for google news. anyone know why. Link to comment https://forums.phpfreaks.com/topic/112662-google-news-rss-feed-on-site/ Share on other sites More sharing options...
DarkWater Posted June 30, 2008 Share Posted June 30, 2008 Uhh....Any errors? Are you actually calling the function? Link to comment https://forums.phpfreaks.com/topic/112662-google-news-rss-feed-on-site/#findComment-578606 Share on other sites More sharing options...
synking Posted June 30, 2008 Author Share Posted June 30, 2008 I fixed it sorry i was using the incorrected feed url. sorry guys. Link to comment https://forums.phpfreaks.com/topic/112662-google-news-rss-feed-on-site/#findComment-578681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.