Upload a file using an API PUT request
Did you read http://php.net/manual/en/features.file-upload.put-method.php ? Script PUT /put.php
all set up?
Also, what is $image
-- it needs to be a file handler, not a file name.
Ps. Using file_get_contents
will try to load whatever is PUT on the server into memory. Not a good idea. See the linked manual page.