I want to make RSS feed from my web page, but I just want to show last 10 items in the feed, without using the SQL databases.
Is it possible?
I mean whether through XML or something else, where only past 10 records will be saved not all.
If so, please tell me the way how to do this?
Where do you currently get your data from, is it manually created or is it stored in a database? Do you currently use a CMS? Do you have a link your website which displays the 10 pieces you wish to provide in your feed? Speaking of which, what are these 10 items, articles, news items?
actually, I am working on localhost.
but the 10 items are the headings of the products (for a products website I am trying to make for my college project).
It is not a CMS, it is built in custom, by myself.
And currently the web page data is static.
I assume you could do something like web scraping with file_get_contents, and find each product through a lot of string manipulation…However things would be simplified A LOT using a database, because you could easily run a query to select the newest 10 items and add them to an rss feed.
Yes, with SQL we could do this easily, but I want something like without database, or only using XML.
So that in future no configuration will be needed.
And only limited items will be stored in that XML (say 20), and after that when new product is inserted, it should act as LIFO (Last In First Out, and so on…)
Is it possible in MySQL or SQLite that, only 20 items will be stored, and after that when I insert, the first element (product) inserted will be popped up (LIFO).
I don’t want to make my database keep more than 20 items, but I want to keep just the recent ones…
As the rest of the site is static, it seems little pointless to add another place to store the products which you want to be displayed in the RSS feed. You may as well just add them directly.
Sir, if you don’t mind, one little question.
Is it possible to put only certain values as I states earlier like 10 or 20 in the MySQL or SQLite database?
And keep updating the new products and removing the old ones…