I do some thing with an xml feed whereby I have a table in my database for the feeds event IDs. When I parse and loop over the feeds events I add the IDs to an array which I compare against the table using the 'whereNotIn' query clause to see which events are new since last feed parse. You would then add the new events to the table to allow for future comparisons between feed and db.
Feb 13, 2016
4
Level 5
Parse XML feed every hour and store the new items in the DB
I'm building a news aggregator app. I want to parse an XML feed every hour and then store the new items in the database. The problem is that how do I parse only the new items in the news feed and do it every hour.
Please or to participate in this conversation.