Почему я получаю нулевой результат, когда я отправляю. Как отправить с помощью raw param?
Здесь мой метод для запроса:
$urlsp = "https://xxx/xxx/forgotpassword/xxx";
$header = array("X-Application-Token : 123er", "Content-Type : application/json");
$param = array("account: 080000xxx",
"secretQuestion:",
"secretAnswer:",
"newPassword: .md5($pass).",
"issuer: 567800");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $urlsp);
curl_setopt ($ch , CURLOPT_HTTPHEADER , $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json_data = curl_exec ($ch);
curl_close ($ch);
$data = json_decode($json_data);
Измените свой параметр таким образом:
$param = array('account'=> '080000xxx','secretQuestion' => $question,'secretAnswer' => $answer,'newPassword' => md5($pass),'issuer' => '567800');