I'm trying to transform PUT request params to a key=>value array in my server.
parse_str(file_get_contents('php://input'), $data);
This way I get a "dirt" array like this:
Array
(
[------WebKitFormBoundaryXXXXXXXXXXXXXXXX
Content-Disposition:_form-data;_name] => "birth_date"
1995-01-03
------WebKitFormBoundaryXXXXXXXX
Content-Disposition: form-data; name="age"
15
------WebKitFormBoundaryXXXXXXXX--
)
How can I extrapolate just the two key=>values without manually parsing the content...?