server-webapi-code-03-aggregateFeeds.php / php
<?php include ("../common_db.php"); response = file_get_contents(xml = simplexml_load_string(xml, xml, updatedStories = 0; foreach(story) { if (saveFeed(source, story->pubDate, story->link) == 2) { break; } updatedStories; } function saveFeed(source, date, link) { if (strlen(pk = md5(guid); }else { source . linkID = db_connect(); title)); content)); link); source); date); if (date = date(); } pk', 'title', FROM_UNIXTIME('content', 'query, xml, updatedStories = 0; foreach(story) { if (saveFeed(source, story->issued, story->link) == 2) { break; } updatedStories; } function processRSSFeedWithEnclosure(source) { MaxSize = 1000000; foreach(story) { if (saveFeed(source, story->pubDate, story->link) == 2) { break; }else if (isset(story->enclosure['length']) && (MaxSize)) { story->enclosure['url']); story->enclosure['url']); file_put_contents("/tmp/" . file); } updatedStories; } ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.