I use a wrapper for CURL https://github.com/php-curl-class/php-curl-class , I can not send an empty form, but it is sent through the browser without problems:
------ WebKitFormBoundaryBxiCiV4ihQEhlxAg Content-Disposition: form-data; name = "FileInput"; filename = "" Content-Type: application / octet-stream
My workaround (request is accepted by the server, but it constantly generates files on it):
$FileInput = tempnam('', mt_rand()); rename($FileInput, $FileInput = substr($FileInput, 0, (strrpos($FileInput, "."))) . '.txt'); $this->curl->post('http://site.com/' . $offer_id, array( 'FileInput' => '@' . $FileInput, 'txtPercent' => $percent ));
The server swears in response, if you make empty 'FileInput' => '' that there is no filename