Title: Noob cannot parse WordPress feed
Last modified: August 19, 2016

---

# Noob cannot parse WordPress feed

 *  [konigrot](https://wordpress.org/support/users/konigrot/)
 * (@konigrot)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/)
 * I have a wordpress installation linked to from my site (actually on the same 
   server) and I’m trying to display the most recent blog posts in the sidebar of
   each site page.
 * Not knowing any better, I downloaded RSS_PHP v3.01 parser and uploaded the unzipped
   files to the server. I’m working on the theory that I need to process the wordpress
   posts feed and display it.
 * The PHP code I inserted in the WordPress index.php for the theme I’m using is
   not working, and outputs error about not being able to connect.
 *     ```
       include_once '../rss_php.3.01/rss_php.php';
           $rss = new rss_php;
   
           $rss->load('http://domain-name/test/?feed=rss2');
   
           $items = $rss->getItems();
       ```
   
 * I’m guessing the error is in the rss load url, but I’ve tried several url formats(
   obviously changing the domain.tld to my own domain) to access the feed:
 * [http://domain.tld/feed/rss2/](http://domain.tld/feed/rss2/)
    Cannot connect
 * [http://domain.tld/wp-rss2.php](http://domain.tld/wp-rss2.php)
    This complains
   that the file is not XML
 * [http://domain.tld/?feed=rss2](http://domain.tld/?feed=rss2)
    Cannot connect
 * Do I need to enable something in the wp installation to ‘activate’ feeds before
   I can access them?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [mikey1](https://wordpress.org/support/users/mikey1/)
 * (@mikey1)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780398)
 * Hi there, I’m certainly no expert at rss feeds,
    but the above url doesn’t seem
   right. I just checked my own.
 * [http://www.myweb.com/wordpress/?feed=rss2](http://www.myweb.com/wordpress/?feed=rss2)
   
   [http://www.myweb.com/wordpress/?feed=comments-rss2](http://www.myweb.com/wordpress/?feed=comments-rss2)
   Theres no link for your site, but is your blog in its own directory. hope it 
   works out for you. mike.
 *  Thread Starter [konigrot](https://wordpress.org/support/users/konigrot/)
 * (@konigrot)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780400)
 * Sorry for not being clear enough. The full path access url I used for that particular
   method does include the install directory:
 * [http://www.click-profits.com/test/?feed=rss2](http://www.click-profits.com/test/?feed=rss2)
 * In browser it outputs xml properly, but the index.php keeps getting an access
   error:
    http_handler could not connect to click-profits.com:80 (PHP Error Number:
   111, Message: Connection refused
 * [http://www.click-profits.com/test/wp-rss2.php](http://www.click-profits.com/test/wp-rss2.php)
   
   This complains that the file is not XML
 * What’s the simplest code to display recent posts in PHP?
 *  [mikey1](https://wordpress.org/support/users/mikey1/)
 * (@mikey1)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780406)
 * Are you using wordpress 2.5.1
    Sorry not really helping you much. not sure really
   why you need RSS_PHP v3.01 woordpress will parse the feed fine. if you’re using
   sidebars you can always test this by adding your feed address to the sidebar 
   rss widget. As far as i am aware there is no feed folder, everything is held 
   in the database ready for wp-rss2.php to handle Don’t worry, this forum is excellent
   with a lot of experts on the subject I’m sure it will be resolved quickly for
   you. good luck. mike
 *  Thread Starter [konigrot](https://wordpress.org/support/users/konigrot/)
 * (@konigrot)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780412)
 * Yes – using latest wordpress. You say wordpress will parse the feed fine – given
   that the ‘latest posts’ info is for a webpage and not to be displayed within 
   wordpress I thought I needed to parse the feeds from wordpress to use them elsewhere.
 * Am I wrong?
 *  Thread Starter [konigrot](https://wordpress.org/support/users/konigrot/)
 * (@konigrot)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780448)
 * Am now trying a different parser, with the following code in the page:
 *     ```
       <?php
       require_once “../RSS.php”;
       $r = & new XML_RSS('http://click-profits.com/test/?feed=rss2');
       if(!file_exists($r)){
       echo “failed to create XML_RSS”;
       }
       $r->parse();
       echo “<h3> Recent Blog Entries From WordPress </h3>”;
       echo “<ul>\n”;
       foreach ($r->getItems() as $entry)
       {
       echo “<li><a href=\”".$entry['link'].”\”>”.$entry['title'].”</a></li>\n”;
       }
       echo “</ul>\n”;
       ?>
       ```
   
 * Get the ‘Recent Blog entries…’ entry but otherwise nothing – and there ARE Blog
   posts before asking!
 *  [mikey1](https://wordpress.org/support/users/mikey1/)
 * (@mikey1)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780487)
 * I cerainly hope it works out for you, after all this work.
    good luck. mike
 *  Thread Starter [konigrot](https://wordpress.org/support/users/konigrot/)
 * (@konigrot)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780508)
 * At the mo it’s almost certainly something stupidly simple I’m overlooking in 
   my lack of experience with PHP functionality, or feeds.
 * Unless I get a thunderbolt formt he blue it’s going to be a slow trial an error
   self-tutorial in PHP from the start. Hello world, here we come.
 *  [scribblerguy](https://wordpress.org/support/users/scribblerguy/)
 * (@scribblerguy)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780516)
 * If the problem is happening for multiple scripts (including WP’s built-in RSS
   widgets), and “Connection Refused” is always the problem, then this seems to 
   be an issue with your server’s firewall. Though, it could be with your server’s
   PHP settings.
 * Your best bet is to check your webhost’s support area for more info or contact
   their support.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Noob cannot parse WordPress feed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [scribblerguy](https://wordpress.org/support/users/scribblerguy/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/noob-cannot-parse-wordpress-feed/#post-780516)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
