Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
Posts: 1
Joined: Fri Feb 10, 2017 8:49 pm

XML-RPC Example?

Fri Feb 10, 2017 8:54 pm

I do not know very well this type of consumption of api (XML-RPC), could someone contribute in this topic, with some example of client so that I can develop something on top? PHP client of course!

Posts: 23
Joined: Sat Apr 08, 2017 9:57 am

Re: XML-RPC Example?

Sat Apr 08, 2017 10:04 am

This should work, at least it does for me:

Code: Select all

//xmlrpc function
function xmlrpc_call($url, $methodName, $callvars) {
   $request=xmlrpc_encode_request($methodName, $callvars, array('encoding'=>'utf-8'));

   $context=stream_context_create(array('http'=>array('method'=>'POST', 'header'=>'Content-Type: text/xml', 'content'=>$request)));

   if([email protected]_get_contents($url, false, $context)) {
      //set error
      return 'Error occured in setting data from xml-rpc [file_get_contents]';
      $xmlrpc=xmlrpc_decode($response, 'utf-8');

      if(xmlrpc_is_fault($xmlrpc)) {
         //set data

   return $data;

//login to opensubtitles

//set token

    'query'=>'Prison Break',



Return to “Developing”

Who is online

Users browsing this forum: No registered users and 4 guests