This question already has an answer here:
I am using file_get_contents('php://input')
function. How can I convert below data into array?
Content-Disposition: form-data; name="accessKey"
test12313
-----------------------------2154836642318
Content-Disposition: form-data; name="username"
test123
-----------------------------2154836642318--
</div>
The answer is found by knowing what to ask:
Manually parse raw HTTP data with PHP
You may be able to get away with using PHP's parse_str function, but there is discussion of a custom solution and links to it when you follow my link.