Forum Moderators: coopster
I'm new to xml-rpc.
how do I make an rpc call to syndic8 to get some stuff?
I've found some tutorials and came up with the following code:
include_once("xmlrpc.inc.php");
$format=new xmlrpcmsg('syndic8.GetAllFeedTags');
$client=new xmlrpc_client("http://www.syndic8.com//xmlrpc.php");
$client->setCredentials("myusername", "mypassword");
$request=$client->send($format);
var_dump($request);
But the output is always int(0), regardless what call I make, or even to what server I connect..
What am I missing?
Please help.
thanks.
<?php
$request = xmlrpc_encode_request("method", array(1, 2, 3));
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml",
'content' => $request
)));
$file = file_get_contents("http://www.example.com/xmlrpc", false, $context);
$response = xmlrpc_decode($file);
if (xmlrpc_is_fault($response)) {
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
} else {
print_r($response);
}
?>
[us.php.net...]