FAQ

Frequently Asked Questions

How to call XML-RPC to update feeds in Echo RSS plugin, on your WordPress site

If you follow theĀ specification of a pingback, it would look like this:

$sourceURI = 'http://FEEDURL.com/feed.xml';
$targetURI = 'http://FEEDURL.com/feed.xml';
$service = 'https://UPDATEDWEBSITE.com/xmlrpc.php';
$request = xmlrpc_encode_request("weblogUpdates.ping", array($sourceURI, $targetURI));
$context = stream_context_create(array('http' => array(
    'method' => "POST",
    'header' => "Content-Type: text/xml",
    'content' => $request
)));
$file = file_get_contents($service, false, $context);
$response = xmlrpc_decode($file);
if ($response && xmlrpc_is_fault($response)) {
    trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
} else {
    print_r($response);
}

Which would give you the following output:

Array
(
    [flerror] => 
    [message] => Thanks for the ping.
)

Keep in mind to always call the weblogUpdates.ping method and to change the https://UPDATEDWEBSITE.com/xmlrpc.php URL from your code to the URL of your website where the plugin is installed. Also, please make sure that the XML-RPC service is enabled on your WordPress site.

Also, http://FEEDURL.com/feed.xml should be changed to the feed URL which you wish to update. Please note that this feed URL must be added for importing in the Echo RSS plugin’s settings (and the rule should be enabled). The minimum time for consecutive running of the same feed using the XML-RPC method is set to 1 hour.

Video tutorials