Einzelnen Beitrag anzeigen
Alt 26.06.2008, 15:22   #6 (permalink)
Timo1983
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
179 bis 190:

// fetch the feed
$fetchedFeed = $this->fetchFeed($feedData->rss_source);

// loop through all elements
foreach($fetchedFeed->get_items() AS $singleItem) {
// check if the post already exists
$numExisting = mysql_query("select id from {$table_prefix}posts where guid='".db_escape($singleItem->get_id())."'");

// only continue, if the guid does not exist
if(mysql_num_rows($numExisting) <= 0) {
// does not exist - import it
$this->importItem($singleItem, $feedData->cat_ID);
Timo1983 ist offline   Mit Zitat antworten