<?php
header('Content-Type: text/html; charset=utf-8');

if (!ini_get('date.timezone')) {
	date_default_timezone_set('Europe/Prague');
}

require_once 'Feed.php';
require_once '../include/Functions.php';

$links = array( "http://maxburstein.com/rss",
            "http://www.engadget.com/rss.xml",
            "http://www.times.co.zm/?feed=rss2");


foreach ($links as $link){
    $rss = Feed::loadRss($link);

    $db = new Functions();
    foreach ($rss->item as $item)
        $db->addFeed($item->link, $item->imageLink, $item->description, $item->title, $item->{'content:encoded'}, date( 'Y-m-d H:i:s', (int)$item->timestamp), isset($item->{'content:encoded'}));
}









