Web services , API rest , Moodle
//METHODS THE CALL AND THE RESPONSE /// method 1 REST CALL header(‘Content-Type: text/plain’); $serverurl = $domainname . ‘/webservice/rest/server.php’. ‘?wstoken=’ . $token . ‘&wsfunction=’.$functionname; require_once(‘./curl.php’); $curl = new curl; //if rest format == ‘xml’, then we do not add the param for backward compatibility with Moodle < 2.2 $restformat = ($restformat == ‘json’)?’&moodlewsrestformat=’ . $restformat:»; $resp […]
Web services , API rest , Moodle Leer más »