Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8686237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:47:41+00:00 2026-06-12T22:47:41+00:00

I am attempting to pull the RSS 2.0 feed for a Facebook Fan page

  • 0

I am attempting to pull the RSS 2.0 feed for a Facebook Fan page from within PHP.

When I access the feed from the browser, no problems. But, when I attempt to pull and use in PHP, Facebook returns code to redirect to a “Upgrade Your Browser” notice. The same happens when I attempt to validate the feed using W3C RSS validator.

So, Facebook must have some logic in place that analyzes the user agent and either delivers the feed, or the “you must update” page.

The question is: how do I get access to that RSS feed from within PHP?

Can I forge user agent headers directly when using SimpleXML or DOMdocument? I know there is an option to pull the feed using CURL (where the headers can be easily set), but I’d prefer not to do so.

Any ideas are welcome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:47:42+00:00Added an answer on June 12, 2026 at 10:47 pm

    Well for those that might also be curious, ini_set() seems to be one solution.

    <?php
    
    ini_set('user_agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0');
    
    $url = 'https://www.facebook.com/feeds/page.php?format=rss20&id={your-page-id}';
    $xml = simplexml_load_file( $url );
    foreach($xml->channel->item as $status){
        // Do something for each News Feed update
    }
    

    Although, when Zuckberberg feels like updating user agent requirements, who knows whether this will validate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to pull out a page feed to RSS from Facebook, however each
I'm attempting to pull data from a page that a user is viewing and
I'm attempting to pull some data off a popular browser based game, but am
Attempting to pull from git repo, but getting the following output. I think these
I'm attempting to pull some data from a SQLite database so that I can
I've been attempting to pull hard-coded configuration data from a Tomcat web-app which I'm
I'm attempting to create an app to pull the sqlite data from a preexisting
I am attempting to pull data from the local database and display it in
I'm attempting to pull two separate things from outside sources to put onto an
I'm getting the following error when attempting to push/pull from my git repository which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.