Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/250061-failing-to-load-rss-feed/
Share on other sites

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? :confused:

 

Ta

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.