how to add data from php cron parser into my database table?

Permalink
Here's the deal. I'm runnung several cron parsers to collect the data (news, weather, etc.) and saving them into server files (let it be raw text), then I fetch those files via simple include into page template.

But I figured, as long as C5 connects to database anyway, what's the point in those additional requests.

Been looking around here, but can't seem to understand how to write data that my parsers collect into C5 database table and retrieve it later on.

Would you guys be so kind to point me in the right direction or even share few lines of code to make that happen. So to write the data to specific table in the background every few hours or so (lets say manually created) and then retrieve it in the page template.

Thanks to all in advance!!!

 
JohntheFish replied on at Permalink Reply
JohntheFish
My Universal Content Puller addon, together with the various addons that work with it, already does pretty much all you are describing.

All you would need to do is create a content source model that read your remote sources. I expect simply linking in code you already have. You may not even need to do that as UCP includes RSS, text file and page scraping (box grabber) content sources, so may be able to get your sources anyway. At the same time, it includes a controllable source cache, so taking care of periodic update.

http://www.concrete5.org/marketplace/addons/universal-content-pulle...