• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rss app

#1
[eluser]garymardell[/eluser]
Hey, if i were to create an application that can parse rss feeds and display them, what is the best way to store that the item has been read.

I guess i will need a table to store the url of the feeds. But how would i go about marking certain feeds as read. Would i have to add the data from the feeds into the database?
Giving each item a unique id and then when viewing the feed try to get any new content and add that to the database.

I really don't know. If someone could suggest a way of making it work that would be appreciated.

#2
[eluser]Evil Wizard[/eluser]
I would just store the url of the feed and a flag field to mark as read and possibly a date field too

#3
[eluser]zimco[/eluser]
You might also want to consider looking at other open-source rss parsers and seeing how they did it. For instance here's a mysql db table from Tiny Tiny Rss that shows some of how they did it:

Code:
create table ttrss_user_entries (
int_id integer not null primary key auto_increment,
ref_id integer not null,
feed_id int not null,
owner_uid integer not null,
marked bool not null default 0,
published bool not null default 0,
last_read datetime,
score int not null default 0,
note text,
unread bool not null default 1,
index (ref_id),
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
index (feed_id),
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.