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

  • Home
  • SEARCH
  • 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 8182845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:58:49+00:00 2026-06-07T00:58:49+00:00

I’m using the following code to read an RSS feed and output the results.

  • 0

I’m using the following code to read an RSS feed and output the results.

function home_page_parser($feedURL) {
    $rss = simplexml_load_file($feedURL);
    $i = 0;
    
    echo  "<ul>";
    
    foreach ($rss->channel->item as $feedItem) {
        $i++;
        $myDate = ($feedItem->pubDate);
        $dateForm = explode(" ", $myDate);
        echo "<li class=\"rss-feed\"><a href=\"$feedItem->link\" title=\"$feedItem->title\" target=\"_blank\">".$feedItem->title."</a><br />" .$feedItem->pubDate. "</li>";
                
    if($i >= 3) break;
        
    echo "</ul>";
    }
}

It is working fine on my testing site at Rackspace Cloud running PHP 5.2

On the live site at Media Temple running PHP 5.3, I get the following errors:


Warning: simplexml_load_file() [function.simplexml-load-file]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /…/html/includes/functions.php on line 39

Warning: simplexml_load_file(http://www.chinaknowledge.com/Newswires/RSS_News/RSS_News.xml) [function.simplexml-load-file]: failed to open stream: no suitable wrapper could be found in /…/html/includes/functions.php on line 39

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://www.chinaknowledge.com/Newswires/RSS_News/RSS_News.xml" in /…/html/includes/functions.php on line 39

Warning: Invalid argument supplied for foreach() in /…/html/includes/functions.php on line 44


Line 39 is this:

$rss = simplexml_load_file($feedURL);

What am I doing wrong or needs to change to work on 5.3?

  • 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-07T00:58:51+00:00Added an answer on June 7, 2026 at 12:58 am

    The error is pretty descriptive dont you think?

    http:// wrapper is disabled in the server configuration by
    allow_url_fopen=0

    You will need to edit the PHP configuration file and change the configuration allow_url_fopen. If you cant do this directly try ini_set()

    Edit: As @evanmcd pointed out in the comments, this configuration can only be set in php.ini. PHP documentation reference.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using parse_ini_file to read the contents of a file however it is
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is

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.