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

Re: Web service error

$
0
0
by Engr. Nayab Bukhari, Syed.  

Dear Tushar Bhatia!

 

Have you tried this

<?php

/// SETUP - NEED TO BE CHANGED
$token = '663c70e3034930ded9a3287fc1716213';
$domainname = 'http://10.0.0.18/moodle209';
$functionname = 'core_enrol_get_users_courses';

//////// core_enrol_get_users_courses ////////

$userid2 = 73;

/// PARAMETERS - NEED TO BE CHANGED IF YOU CALL A DIFFERENT FUNCTION
$params = array($userid2);

/// XML-RPC CALL 
header('Content-Type: text/plain');
$serverurl = $domainname . '/webservice/xmlrpc/server.php'. '?wstoken=' . $token;
require_once('./curl.php');
$curl = new curl;
$post = xmlrpc_encode_request($functionname, $params);
$resp = xmlrpc_decode($curl->post($serverurl, $post));

print_r($resp);
?>

From page

https://tracker.moodle.org/browse/MDL-34177


Viewing all articles
Browse latest Browse all 2361

Trending Articles



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