Or does PHP not allow this? I have read it is possible using PUT but the server is expecting POST only.
cURL has already support for streams, try curl --help | grep binary and you will get:
curl --help | grep binary
--data-binary DATA HTTP POST binary data (H)
An example:
curl -v -XPOST http://example:port/path --data-binary @file.tar -H "Content-Type: application/octet-stream"
2.1m questions
2.1m answers
60 comments
57.0k users