longestdrive Posted October 29, 2011 Share Posted October 29, 2011 Hi I.m trying to load an RSS feed from a google calendar. I'm using a script from the w3schools website which works with the demo RSS feeds. I changed the URL to my google calendar and for some reason it can't open the feed. I get an error: Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity I changed the calendar to a shared one and tried that URL but same result. I found another script specifically for google calendar feed but same results. The scripts open with other feeds but not google calendar. ANy ideas? <?php //get the q parameter from URL $q=$_GET["q"]; //find out which feed was selected if($q=="Google") { $xml=("https://www.google.com/calendar/feeds/...group.calendar.google.com/private-313f84595f6e8dbfc7dc80f450d3e8be/basic"); } elseif($q=="MSNBC") { $xml=("http://rss.msnbc.msn.com/id/3032091/device/rss/rss.xml"); } $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); I removed the unique id for the calendar for now Any help appreciated Quote Link to comment https://forums.phpfreaks.com/topic/250061-failing-to-load-rss-feed/ Share on other sites More sharing options...
QuickOldCar Posted October 29, 2011 Share Posted October 29, 2011 A helpful article to display in various ways. http://www.ibm.com/developerworks/opensource/library/os-php-xpath/ Quote Link to comment https://forums.phpfreaks.com/topic/250061-failing-to-load-rss-feed/#findComment-1283338 Share on other sites More sharing options...
longestdrive Posted November 1, 2011 Author Share Posted November 1, 2011 Hi Thanks for the link, I had seen this one -a useful read. I managed to get my code to work on a public feed but can't get it to work on a private calendar. this is wherer the problem sits. If I make the calendar public it works, if I go back to private and use the private url it doesn't work. Am I missing something obvious with google calendar feeds? Ta Quote Link to comment https://forums.phpfreaks.com/topic/250061-failing-to-load-rss-feed/#findComment-1283922 Share on other sites More sharing options...
QuickOldCar Posted November 2, 2011 Share Posted November 2, 2011 Yes, public - everyone can see it, private - only you can see it while logged into google Quote Link to comment https://forums.phpfreaks.com/topic/250061-failing-to-load-rss-feed/#findComment-1284206 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.