Results 1 to 3 of 3

Thread: How to create rss.php

  1. #1
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to create rss.php

    Hi folks,


    If I found an interesting news site but can't find *.rss.php how can I create it?


    e.g.
    http://www.ft.com/world/us


    How to search the news sites with *rss.php file available? TIA


    B.R.
    satimis
    Last edited by satimis; 03-13-2008 at 03:11 AM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Do you want to create your own RSS feeds or you can't find FT's RSS feeds..

    Either way...

    Creating RSS Feeds: http://www.bitfolge.de/rsscreator-en.html
    Parsing RSS Feeds: http://www.sitepoint.com/article/php...arsing-rss-1-0

    Financial Times' RSS Feeds: http://www.ft.com/servicestools/newstracking/rss

  3. The Following User Says Thank You to Medyman For This Useful Post:

    boogyman (03-13-2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    Do you want to create your own RSS feeds or you can't find FT's RSS feeds..

    Either way...

    Creating RSS Feeds: http://www.bitfolge.de/rsscreator-en.html
    Parsing RSS Feeds: http://www.sitepoint.com/article/php...arsing-rss-1-0

    Financial Times' RSS Feeds: http://www.ft.com/servicestools/newstracking/rss
    Thanks for your URL


    With following script
    Code:
    <?php
    function ShowOneRSS($url) {
    global $rss;
    if ($rs = $rss->get($url)) {
    echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
    echo $rs['description']."<br>\n";
    echo "<ul>\n";
    foreach ($rs['items'] as $item) {
    echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
    }
    if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
    echo "</ul>\n";
    }
    }
    // ===
    // include lastRSS
    include "lastRSS.php";
    // List of RSS URLs
    $rss_left = array(
    'http://www.rte.ie/rss/gaa.xml',
    );
    $rss_right = array(
    'http://www.independent.ie/sport/hurling/rss'
    );
    // Create lastRSS object
    $rss = new lastRSS;
    // Set cache dir, cache interval and character encoding
    $rss->cache_dir = 'cache';
    $rss->cache_time = 14000; // (4hrs)
    $rss->cp = '';
    $rss->items_limit = 5;
    // Show all rss files
    echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
    foreach ($rss_left as $url) ShowOneRSS($url);
    echo '</td><td width="50%" valign="top">';
    foreach ($rss_right as $url) ShowOneRSS($url);
    echo '</td></tr></table>';
    ?>
    I can integrate feeds from other sites to my website allowing visitors reading the news on their PC. But I need the feeding sites providing rss.php files for creating the liniks. On some sites found on Internet I can't locate their rss.php files. I wonder without the said files how can I integrate their URL to the scrips abovementioned. Whether I can create rss.php files myself for integration. If YES then how? TIA


    Besides I'm still searching around for a solution to create news head lines scrolling on marquee container. Advice would be appreciated. Thanks


    B.R.
    satimis

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •