SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot RishikeshJha's Avatar
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS feed problem??

    Hi,

    I want to make a site where user can read a news from the different newspaper of the world. This could be done through rss feed. At a same time i want to store this fees in our database. and show this on my own site. The user can give comment on this news feeds. But the problem is that i really don't know how to store this feed in database. can anyone give me script or idea how to do this.

    Thanks in advance.....

  2. #2
    SitePoint Enthusiast stef686's Avatar
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there, are you talking about getting RSS feeds that are currently published by newspapers online? If you're using PHP 5 reading the content of RSS feeds is really easy with SimpleXmlElement.

  3. #3
    SitePoint Zealot RishikeshJha's Avatar
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yaa you are right. i am talking about news sites. but at the same time i want to store this feed into database. can u help me..

  4. #4
    SitePoint Enthusiast stef686's Avatar
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah ok, well with SimpleXmlElement you end up with an array of all the contents from the RSS feed which you can loop through (as shown in the tutorial I linked to before). In the loop it would be pretty easy to add the stories to a database table

  5. #5
    SitePoint Zealot RishikeshJha's Avatar
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    one more thing...

    can it would be possible that user can give comment on the news feed comming from another site.

  6. #6
    SitePoint Enthusiast stef686's Avatar
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the comments you would have to use your database as well I think, so you have a comments table and each comment is associated with a news post from your news table.

  7. #7
    SitePoint Zealot RishikeshJha's Avatar
    Join Date
    Mar 2009
    Location
    INDIA
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yaa right i using database to store comment as well as news feed


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
  •