Hi, this the code I'm using in order to get the courses:
<?php
$token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'';
$domainname = 'http://localhost/moodle311';
$functionname = 'core_course_get_courses';
// REST RETURNED VALUES FORMAT
$restformat = 'xml';
/// REST CALL
$params = array();
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);
And I want to the same thing for this fucntion: core_enrol_get_users_courses , but it needs a parameter which is the user ID, I want to know how can I give it to the function, what should I do? Thanks.