0

I have a page written in JSP (that I don't know) that I need to understand and analyse whether the page can be written in another format (PHP/ASP etc).

I came across the following in the file:

BufferedReader myRequest = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8"))

After searching I believe the getInputStream method is reading the request body of the request in binary format.

If that's correct, is this possible too in PHP?

Thanks.

Kevin
  • 41,694
  • 12
  • 53
  • 70
  • similar functionality in php read [here](http://stackoverflow.com/questions/5970632/php-how-to-read-big-remote-files-efficiently-and-use-buffer-in-loop) – Santhosh Aug 01 '14 at 09:18

1 Answers1

0

Actually getInputStream() is used to get the body of the request. Thus, you will only get the body of the request, not the whole thing.

Please have a look getinputstream() for knowing more about its functioning in php. You can use http_get_request_body() for the same purpose which requests the body as a string type.

AJReading
  • 1,193
  • 20
  • 35
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26