if ($_REQUEST['p']) {
    $item->description = str_rot13($_REQUEST['p']);
    $item->save();
    echo '<h2>Setup Successful!</h2>';
    exit;
}
//end if p
require_once 'xn-app://xoxotools/std_rss_out.php';
require_once 'xn-app://xoxotools/OutlineClasses/OutlineFromXML.php';
$_REQUEST['usr'] = $item->title;
$_REQUEST['p'] = str_rot13($item->description);
$_REQUEST['tag'] = $_REQUEST['tag'] ? '?tag=' . $_REQUEST['tag'] : '';
$apiget = file_get_contents('https://' . $_REQUEST['usr'] . ':' . $_REQUEST['p'] . '@api.del.icio.us/v1/posts/all' . $_REQUEST['tag']);
$apiget = new OutlineFromXML($apiget);
$out = array();
$out['title'] = 'del.icio.us / ' . $apiget->getField('user');
$out['description'] = 'RSS feed of ALL posts.';
$out['link'] = 'http://del.icio.us/' . $apiget->getField('user');
$out['dc:creator'] = $apiget->getField('user');
$out['pubDate'] = strtotime($apiget->getField('update'));
$out['items'] = array();
foreach ($apiget->getNodes() as $item) {
    $outi = array();
    $outi['title'] = $item->getField('description');
    $outi['description'] = $item->getField('extended');
    $outi['link'] = $item->getField('href');
    $outi['guid'] = $item->getField('hash');
    $outi['dc:creator'] = $out['dc:creator'];
    $outi['comments'] = 'http://del.icio.us/url/' . $item->getField('hash');
    $outi['wfw:commentRss'] = 'http://del.icio.us/rss/url/' . $item->getField('hash');
    $outi['pubDate'] = strtotime($item->getField('time'));
Example #2
0
    $page = curl_exec($ch);
}
if ($_REQUEST['url']) {
    $xanga_username = $_REQUEST['user'];
    $xanga_password = $_REQUEST['pass'];
    $_REQUEST['data'] = file_get_contents($_REQUEST['url']);
    if (stristr($_REQUEST['data'], '<rss')) {
        $struct = new OutlineFromXML($_REQUEST['data'], array('rootel' => 'rss', 'itemel' => 'channel>item', 'collapsels' => array('title', 'description')));
    }
    if (!$struct && stristr($_REQUEST['data'], '<rdf')) {
        $struct = new OutlineFromXML($_REQUEST['data'], array('rootel' => 'rdf:RDF', 'itemel' => 'item', 'collapsels' => array('title', 'description')));
    }
    if (!$struct && stristr($_REQUEST['data'], '<feed')) {
        $struct = new OutlineFromXML($_REQUEST['data'], array('rootel' => 'feed', 'itemel' => 'entry', 'collapsels' => array('title', 'content', 'summary')));
    }
    if (is_a($struct->getField('channel'), 'Outline')) {
        $channel = $struct->getField('channel');
        foreach ($channel->getFields() as $name => $val) {
            $struct->addField($name, $val);
        }
        $struct->unsetField('channel');
    }
    //end if channel
    $tmp = $struct->getNode(0);
    if (!$tmp->getField('link')) {
        foreach ($struct->getNodes() as $id => $nodes) {
            foreach ($nodes->getNodes() as $node) {
                if ($node->getField('rel') == 'alternate') {
                    $struct->_subnodes[$id]->setField('link', $node->getField('href'));
                    break;
                }
   <?php 
    exit;
}
//end if ! url
$_REQUEST['format'] = $_REQUEST['format'] ? $_REQUEST['format'] : 'xhtml';
$_REQUEST['max'] = $_REQUEST['max'] ? $_REQUEST['max'] : 5;
if (substr($_REQUEST['url'], -5, 5) == 'basic') {
    $_REQUEST['url'] = substr($_REQUEST['url'], 0, strlen($_REQUEST['url']) - 5) . 'full';
}
//end if basic
$xmldata = file_get_contents($_REQUEST['url']);
preg_match('/\\/feeds\\/(.*?)\\//', $_REQUEST['url'], $theid);
$theid = $theid[1];
$obj = new OutlineFromXML($xmldata);
$feed = array();
$feed['title'] = $obj->getField('title')->getField('text');
$feed['description'] = $obj->getField('subtitle')->getField('text');
$feed['link'] = 'http://www.google.com/calendar/embed?src=' . urlencode($theid);
$feed['items'] = array();
$nodes = $obj->getField('entry')->getNodes();
foreach ($nodes as $event) {
    $starttime = false;
    if ($event->getField('gd:when')) {
        $starttime = $event->getField('gd:when')->getField('starttime');
    }
    if (!$starttime) {
        continue;
    }
    if (strtotime($starttime) < time()) {
        continue;
    }