Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2012, 07:48 PM   PM User | #1
javanewbie7
Regular Coder

 
Join Date: Oct 2010
Posts: 121
Thanks: 25
Thanked 0 Times in 0 Posts
javanewbie7 is an unknown quantity at this point
Probably a dumb question about posting RSS Feed info on Website with PHP

I'm trying to take two separate blogs from wordpress and one from blogger and post the latest blog on my website. Actually, not the full blog, just the title, maybe 100 characters and then continue reading with a url to the post.

Anyway, I believe I have the correct PHP to do this and I've read online that magpie is a good RSS parser to use. My question is, what do I do with the file I dl from MagPie? I mean, do I place the file on my server or ??

The file I dl is called something like magpierss-0.72.tar.gz

Just in case it's needed, here's the code that I came up with the help of the MagPie Website

Code:
<?php  
require_once 'rss_fetch.inc';

$url = 'http://straight2jackie.blogspot.com/feeds/posts/default?alt=rss';
$rss = fetch_rss($url);

echo "Site: ", $rss->channel['title'], "<br>";
foreach ($rss->items as $item ) {
    $title = $item[title];
    $url   = $item[link];
    echo "<a href=$url>$title</a></li><br>";
}

?>
thanks.
javanewbie7 is offline   Reply With Quote
Old 12-06-2012, 05:09 PM   PM User | #2
javanewbie7
Regular Coder

 
Join Date: Oct 2010
Posts: 121
Thanks: 25
Thanked 0 Times in 0 Posts
javanewbie7 is an unknown quantity at this point
UPDATE: I fond a different parser (simplepie) that had directions. The instructions were simple. But after I tried to test it, I get these errors. I have no idea what these errors are indication

Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /hermes/bosweb/web177/b1775/ipg.waldropcom/php/test.php on line 7

Warning: require_once(waldrop.com/php/autoloader.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /hermes/bosweb/web177/b1775/ipg.waldropcom/php/test.php on line 7

Fatal error: require_once() [function.require]: Failed opening required '/php/autoloader.php' (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /hermes/bosweb/web177/b1775/ipg.waldropcom/php/test.php on line 7

any ideas?
javanewbie7 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:24 AM.


Advertisement
Log in to turn off these ads.