Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Re: XML-RPC Protocol problem

$
0
0
by vijaya reddy.  

Hello Rajaraman,

Use the following code in your client side php page.

<?php

$token = ' ';

$domainname = ' ';

$functionname = 'core_user_get_users_by_id';

$restformat = 'xml';

$userid=2; //here give value for userid 

$params = array('userids' => array($userid));

header('Content-Type: text/plain');

$serverurl = $domainname . '/webservice/rest/server.php'. '?wstoken=' . $token . '&wsfunction='.$functionname;

require_once('curl.php');

$curl = new curl;

$restformat = ($restformat == 'json')?'&moodlewsrestformat=' . $restformat:'';

$resp = $curl->post($serverurl . $restformat, $params);

print_r($resp);


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>