I want to receive the following HTTP request in PHP:
Content-type: multipart/form-data;boundary=main_boundary
--main_boundary
Content-type: text/xml
<?xml version='1.0'?>
<content>
Some content goes here
</content>
--main_boundary
Content-type: multipart/mixed;boundary=sub_boundary
--sub_boundary
Content-type: application/octet-stream
File A contents
--sub_boundary
Content-type: application/octet-stream
File B contents
--sub_boundary
--main_boundary--
(Note: I have indented the sub-parts only to make it more readable for this post.)
I'm not very fluent in PHP and would like to get some help/pointers to figure out how to receive this kind of multipart form request in PHP code. I have once written some code where I received a standard HTML form and then I could access the form elements by using their name as index key in the "$HTTP_GET_VARS" array, but in this case there are no form element names, and the form data parts are not linear (i.e. sub parts = multilevel array).
Grateful for any help!
/Robert