i need to post Data in Xml to a server but whnen i use a basic curl post i have a redirect page to the curl url , but when i use something like postman it works just find , I even tried the code generated by postman and i got the same results (redirect) here is my curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "URL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, ["SAMLResponse"=> $xml]);
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "content-type: application/x-www-form-urlencoded";
$headers[] = "authorization: Basic CODE";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = (curl_exec($ch));