Getting Feedback from a POST request - PHP

one text

So, I'm making an upload service, what we are using is a API from a storage service. We send a POST request containing the file(that needs to be uploaded) but the API responds with redirecting to a XML page containing a key to access the file. what I need is to:

  1. Prevent HTML form from redirecting to that site.
  2. Somehow recieve feedback from API
  3. Use it

I tried GET, didn't work. I couldn't find any solution to even try it anywhere.

Source