Пытаюсь загрузить файл excel в одно веб-приложение делаю так (никаких ошибок не возвращает, но в ответ и не приходит массив который должен прийти):
$this->headers = [
"Content-Type: multipart/form-data",
"Referer: http://domain.com/hand.html",
"Origin: http://domain.com",
"UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
];
$post = [
"file" => curl_file_create ("../../test.xlsx"), "name" => "test.xlsx",
"name" => "test.xlsx"
];
$this->curl = curl_init ($url);
curl_setopt ($this->curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($this->curl, CURLOPT_HTTPHEADER, $this->headers);
curl_setopt ($this->curl, CURLOPT_POST, true);
curl_setopt ($this->curl, CURLOPT_POSTFIELDS, $post);
$result = curl_exec ($this->curl);
curl_close ($this->curl);
$json = json_decode ($result, true);
return $json;