<?php require_once "../sdk/httprequest.php"; $config = json_decode(file_get_contents("../data/ajaxconfig.json"), true); $url = $config["url"]; $username = $_POST["username"]; $reqbody = "password="******"password"]); $req = new JackzhengHttpRequest(); $req->setApiEndpoint($config["requestapi"]); $res = $req->runRequest($url, "/users/{$username}/authtoken", "POST", $reqbody, "{}", 5739, "http"); echo json_encode($res);