0

I have a Sharepoint List RSS feed that I want to include in a PHP page.

  • I installed PHP 7.2 (Win Server 2012R2 and IIS 7). It works.
  • I use this url for the RSS feed:

https://example.com/subsite/subsite/_layouts/15/listfeed.aspx?List={ACE12345B-3F1E-49EA-B4B8-05BCB3CEFE34}&Source=https://example.com/subsite/subsite/SitePages/Home.aspx

  • When I call that RSS feed url from a browser, it pulls up the RSS feed and shows the data. Awesome!

  • When I try to use the following PHP, no data is returned from the RSS feed:

        $rss = new DOMDocument();
        $rss->load('https://example.com/subsite/subsite/_layouts/15/listfeed.aspx?List={ACE12345B-3F1E-49EA-B4B8-05BCB3CEFE34}&Source=https://example.com/subsite/subsite/SitePages/Home.aspx');
    
        echo "<pre>";
        print_r($rss);
        echo "</pre>";
    

Same url, the only difference is it is being called by PHP.

I did one additional test. I pulled up the RSS feed in the browser, then copied the raw output to a text file, then called that text file with PHP.

$rss->load('rss-cal.rss');

That works! So, I know that the format of the Sharepoint RSS feed is perfect.

My question: Is there some setting that I need to modify in IIS or Sharepoint to allow non-browser access the RSS feed??

0

You need to authenticate to the server.

Unless that RSS feed (And the list below it) is configured to allow anonymous access you need to make sure you pass the user credentials when opening a SharePoint resource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.