So I have RSS feed of 10 000 records in file.xml
(I collected them from 10 feeds in 1 hour time so there timestamps will not help, btw I used yahoo pipes). I need some class to simulate that records appearing 24 per a day with 1 per hour.
How I see it:
turn file.xml
into sql table (if you know a class for this please help)
create timestamps (can any one give a good way for generating timestamps for 10 000 records?)
create class for returning rss (looking at computer clock and returning records from first to now) (could you please provide a way for generating valid RSS from DB?)
So please provide any help if you can.
I use xampp as php apache mysql server holder.
I am going to use it localy in my dev machin (both sides - server and client)
$doc = new DOMDocument();
$doc->loadHTMLFile($file);
$xpath = new DOMXpath($doc);
$elements = $xpath->query("//fileroot/nodes");
if (!is_null($elements)) {
$dateinterval = [0 hours];
foreach ($elements as $element) {
// read each node and then store it...
$storycontents = $element->nodeValue;
$storytimestamp = date() - $dateinterval;
$dateinterval = $dateinterval - [1 hour];
[add story to rss feed]
}
}
[render all of the collected rss feed stories]
Some of it is pseudocode where you can fill it out. But something along these lines basically.