I got the docs from the third party that is sending me a file over http protocol and I need to write a script that will successfully receive the sent file. Content-type is set as application/gzip
so I can't pick up the file uploaded using a $_FILES
variable as it would be easy with multipart/form-data
.
This link gave me a hint: http://php.net/manual/en/features.file-upload.post-method.php
Note: Be sure your file upload form has attribute enctype="multipart/form-data" otherwise the file upload will not work.
I tried to reproduce their "client" side to test my server using the example in the following url http://blog.derakkilgo.com/2009/06/07/send-a-file-via-post-with-curl-and-php/
And to ensure crosdomain posting is available, I used a function posted and explained by @slashingweapon CORS with php headers
There must be a way to do it - Halp!