Over a million developers have joined DZone.

Feedwordpress Mod

A simplified version of update-feeds.php from the Feedwordpress project.  This version doesn't bother checking for authentication as there's really no point.  It doesn't check whether it's being run at the commandline either, it simply assumes it is being called by wget as a cron job.  This is designed to be run with version 0.98

Updating ".$feed['link/name']." from <".$feed['link/uri']."> ...\n";
        else :
                echo "* Updating ".$feed['link/name']." from <".$feed['link/uri']."> ...\n";

# -- Don't change these unless you know what you're doing...
define ('RPC_MAGIC', 'tag:radgeek.com/projects/feedwordpress/'); // update all

// Query secret word from database
$rpc_secret = get_settings('feedwordpress_rpc_secret');

header("Content-Type: {$update_feeds_display}; charset=utf-8");

        // Henceforward, we can proceed on the assumption that we have an authenticated user
        $uri = (isset($_REQUEST['uri']) ? $_REQUEST['uri'] : RPC_MAGIC.$rpc_secret);

        if ($update_feeds_display=='text/html') :
                echo <<

update-feeds :: FeedWordPress

update-feeds: make FeedWordPress check for new syndicated content

EOHTML; endif; $feedwordpress =& new FeedWordPress; if ($update_feeds_display=='text/html' or $update_feeds_verbose) : add_action('feedwordpress_check_feed', 'update_feeds_mention'); endif; if ($update_feeds_display=='text/html') : // HTTP GET or HTTP POST: add some web niceties echo "
\n"; echo " "; echo "\n"; echo "
\n"; endif; if ($update_feeds_invoke != 'get') : // Only do things with side-effects for HTTP POST or command l ine if ($update_feeds_display == 'text/html') : echo "
    \n"; endif; $delta = @$feedwordpress->update($uri); if ($update_feeds_display == 'text/html') : echo "
\n"; endif; if (is_null($delta)) : if ($update_feeds_invoke == 'cmd') : $stderr = fopen('php://stderr', 'w'); fputs($stderr, "update-feeds (".date('Y-m-d H:i:s')."): ERROR: I don't synd icate <$uri>\n"); elseif ($update_feeds_display == 'text/plain') : echo "update-feeds (".date('Y-m-d H:i:s')."): ERROR: I don't syndicate <$ur i>\n"; else : echo "

Error: I don't syndicate $uri

\n"; endif; elseif ($update_feeds_display=='text/html' or $update_feeds_verbose) : $mesg = array(); if (isset($delta['new'])) : $mesg[] = ' '.$delta['new'].' new posts were syndicated '; endif; if (isset($delta['updated'])) : $mesg[] = ' '.$delta['updated'].' existing posts we re updated'; endif; if ($update_feeds_display=='text/html') : echo "

"; endif; echo "Update complete.".implode(' and', $mesg); if ($update_feeds_display=='text/html') : echo "

"; endif; echo "\n"; flush(); endif; endif; if ($update_feeds_display=='text/html') : // HTTP GET or HTTP POST: close off web niceties echo <<← Return to WordPress Dashboard

EOHTML; endif; ?>

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}