Hello everybody... I am working on a site , there is a news portion , Now I cant update news daily so I want news to come from other sites like bbc.com, Now bbc is providing RSS but how can use it. Plz provide me with all possible solutions Regards sohail
RSS is an acronym of "Really Simple Syndication", and is an feed built like xml http://en.wikipedia.org/wiki/RSS To parse the RSS feed in php, you need a parser class (or make it yourself). I think the most commonly used php parser is Magpie RSS. Check it out at http://magpierss.sourceforge.net/
Hey buddy thanks I have the script for parsing and its working fine. I was doing this for news. Now my problem is that how can make my own rss feed??/ some idea?? If some body can tell me the general idea of RSS. I am learning XML, difinitly Xml cant be teached here.. so i am just asking for the flow of controll in RSS and its general idea. thanks and regards sohail
XML is just an specification to create markup languages. A RSS file can actually be named .xm (RSS2) l, and I think that that's the most used extension, not many uses .rss (RSS1). You start the file with: <?xml version="1.0"?> <rss version="2.0"> Code (markup): This defines that the current file is an XML 1.0 file, more precisely: RSS 2.0. Then you have to make a channel, the channel contains all the news items. So you write <channel>. Now you have this: <?xml version="1.0"?> <rss version="2.0"> <channel> </channel> </rss> Code (markup): As you can see, <rss> contains the channel, and inside <channel></channel>, you should place the news items itself. You can name your channel and give it a lot more parametres, like: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>My website's newsfeed</title> <link>http://mywebsite.com/</link> <description>This is the RSS for the programming news section of my website.</description> </channel> </rss> Code (markup): Now you have created your channel, and do only need the news items. Every item should be placed inside <item></item>, like this: <item> <title>News item 1</title> <link>http://mywebsite.com/news.php?id=3</link> <description>A quick description of the article</description> <pubDate>Thu, 27 Nov 2008 08:26:21 GMT</pubDate> </item> Code (markup): You should place every <item> inside the <channel> below the channel description: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>My website's newsfeed</title> <link>http://mywebsite.com/</link> <description>This is the RSS for the programming news section of my website.</description> <item> <title>News item 1</title> <link>http://mywebsite.com/news.php?id=3</link> <description>A quick description of the article</description> <pubDate>Thu, 27 Nov 2008 08:26:21 GMT</pubDate> </item> <item> <title>News item 2</title> <link>http://mywebsite.com/news.php?id=4</link> <description>A quick description of the article</description> <pubDate>Thu, 27 Nov 2008 08:26:21 GMT</pubDate> </item> <item> <title>News item 3</title> <link>http://mywebsite.com/news.php?id=5</link> <description>A quick description of the article</description> <pubDate>Thu, 27 Nov 2008 08:26:21 GMT</pubDate> </item> </channel> </rss> Code (markup): That's it. Voila... You have just created your first rss feed.