TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-11-2009, 10:19 PM   #1 (permalink)
The Contributor
 
marxx's Avatar
 
Join Date: Sep 2007
Location: Finland
Posts: 45
Thanks: 3
marxx is on a distinguished road
Default RSS Parsing + multiple feeds??

Hi all!

I have this problem about RSS parsing and multiple feeds..

I want to get feeds from several place and show them in one feed stream.. You can see example in here (google feed API whit javascript).

Script what I have being using is lastRSS and I have managed to get feeds showing but not in same stream.. Is there way to get it done via lastRSS script or should I try other one instead?

Could saving feeds info into database be one way??

Thanks for all help and hints!! :)


Ps. below is some example of this lastRSS script what I'm using, could there be something??

Code:
<?php

function ShowOneRSS($url) {
    global $rss;
    if ($rs = $rss->get($url)) {

            echo "<ul>\n";
            foreach ($rs['items'] as $item) {
                echo "\t<li><a href=\"$item[link]\">$item[title]</a> - <small><a href=\"$rs[link]\">$rs[title]</a></small></li>\n";
            }
            echo "</ul>\n";
    }
    else {
        echo "Sorry: It's not possible to reach RSS file $url\n<br />";
        // you will probably hide this message in a live version
    }
} 

// include lastRSS
include "./lastRSS.php";

$rssall = array('http://applereviews.com/feed/',
                'http://www.datacenterknowledge.com/feed/',
                'http://feeds.feedburner.com/Woork');

// Create lastRSS object
$rss = new lastRSS;

// Set cache dir and cache time limit (1200 seconds)
// (don't forget to chmod cahce dir to 777 to allow writing)
$rss->cache_dir = './temp';
$rss->cache_time = 1200;
$rss->cp = 'UTF-8';
$rss->items_limit = 5;

foreach ($rssall as $url) {
    ShowOneRSS($url);
} 
?>
Send a message via MSN to marxx
marxx is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Mail - Help sending multiple attachments xperience Absolute Beginners 5 09-06-2010 08:27 AM
Passing multiple arguments to a function via one variable. delayedinsanity Advanced PHP Programming 10 05-07-2008 05:04 AM
Storing multiple file paths inside a database Orc General 10 02-17-2008 04:29 AM
Multiple Servers? Sam Granger Advanced PHP Programming 5 02-08-2008 03:14 PM
RSS Feeds mike.fro News and Announcements 1 02-20-2007 10:47 PM


All times are GMT. The time now is 08:26 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design