Search:
serverurl.'/user/get_token'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, format_postdata($connectiondata)); $token = curl_exec($ch); $data['token'] = $token; $data['username'] = $username; $data['mnethostid'] = $mnethostid; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $CFG->serverurl.'/user/delete_user'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, format_postdata($data)); $out = curl_exec($ch); $res = basicxml_xml_to_object($out); //show_object($res->user,2,'auth'); var_dump($res); show_xml ($out); } else { echo "

Fill the form first

"; } end_interface(); ?>