Domanda

Currently an application I made in PHP/Codeigniter uses the SimplePie library to parse feeds. There is one main external feed it fetches that it checks every 5 mins for new items using a cron job. For one off feed fetches it is okay to just run a huge feed dump and parse the RSS items into the database. However, I am wondering if there is a better way to do this.

I know of the google API, however it has limits such as 100 entries, which is not such a bad thing since I will be checking often and there will be only a few entries to update with. However, if im going to use the service to poll the API and Feed every 5 mins, I might run into issues later.

So my question is - is there a better way to handle such things like RSS in the modern web? Moving away from SimplePie and moving to the google feed API was initially attractive because of the caching, quick response and json response. A way of detecting an update to the feed without a frequent cron job would be nice.

È stato utile?

Soluzione

Could you use https://code.google.com/p/pubsubhubbub/?

There is a PHP subscriber library here https://github.com/lxbarth/PuSHSubscriber

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top