X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/5ec97892b8d65ffdff8eef18495632e1c2c7c22e..c161360499e837eac383a3a2f606fa169e97081f:/rest_client.php diff --git a/rest_client.php b/rest_client.php index 0f1e44b..f01be68 100644 --- a/rest_client.php +++ b/rest_client.php @@ -19,13 +19,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -require_once '/home/mir/git/qtadmin/config.php'; +require_once 'config.php'; require_once $CFG->root . 'lib/utils.inc.php'; +session_start(); $util = new Utils; +$ticket = $cookies = null; $data = 'username=mir@miras.org&password=Clara0503'; -$response = $util->RESTCall($CFG->wblistadm_url.'/ticket', $data, $cookiesIn = '') +$response = $util->RESTCall($CFG->wblistadm_url.'/ticket', $data, $cookiesIn = ''); +if ($response['http_code'] >= 200 && $response['http_code'] <= 204) { + $ticket = json_decode($response['content']); + $cookies = $response['cookies']; +} ?> RESTCall($CFG->wblistadm_url.'/ticket', $data, $cookiesIn = ' - +
+
+