0

Is there anything open source available for this?

or

Is there a way to parse a stream of bytes received from a POST request manually and convert the chunks of bytes to the appropriate data types?

CuriousGeorge
  • 7,120
  • 6
  • 42
  • 74
  • I hope this is useful: [PHP - Converting byte-stream into numeric data-type](http://stackoverflow.com/questions/726092/converting-byte-stream-into-numeric-data-type) – Matias Cicero Oct 28 '14 at 16:18

1 Answers1

0

I'm not sure if there is anything open source for this, but PHP does support the needed features out of the box.

the contents of a POST request can be retrieved as follows:

$data = file_get_contents("php://input");

// or to handle the data as a stream
$stream = fopen("php://input", "rb");

The above is the preferred method, as $HTTP_RAW_POST_DATA is deprecated.

The data can then be parsed using the PHP unpack() function.

CuriousGeorge
  • 7,120
  • 6
  • 42
  • 74