I'm trying to get some information from last.fm with Codeigniter.
$this->load->library("xmlrpc");
$this->xmlrpc->server("http://ws.audioscrobbler.com/2.0/", 80);
$this->xmlrpc->method("user.getrecenttracks");
$request = array("rj", "b25b959554ed76058ac220b7b2e0a026");
$this->xmlrpc->request($request);
if(!$this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}
The only response I always get is: Invalid parameters - Your request is missing a required parameter
It tried some variations with the request array, but it simply doesn't work the way I handle it...
You're close.
$request
should actually be written like this:The actual request that CodeIgniter's XML-RPC class constructs will then look like this:
You can see an example Last.fm XML-RPC request here. Note that you should "send your params as named arguments using a struct in the first param node." Keeping that in mind, the CodeIgniter docs state:
Hope that helps.