SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2008
    Location
    Plymouth, United Kingdon
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to read and display a rss feed on my website with php

    Hi,
    I want to read and display a RSS feed from a news site onto my website, for instance this is the RSS URL which I want to pull the news feed from,

    http://pipes.yahoo.com/pipes/pipe.ru...kA&_render=rss

    I have been searching for some tutorial online, but still cannot find any good resources.

    Please let me know whether you know any tutorial online, or you know how to programme this with php.

    Many thanks,
    Lau

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    http://magpierss.sourceforge.net/

    PHP Code:
    require_once 'rss_fetch.inc';

    $url 'http://pipes.yahoo.com/pipes/pipe.run?_id=YGtVQgki3hG_o3ZZ0j6skA&_render=rss';
    $rss fetch_rss($url);

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


  3. #3
    SitePoint Evangelist
    Join Date
    Dec 2008
    Location
    Plymouth, United Kingdon
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got it now! thank you so much!


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
  •