Opening webpage using ESP8266 in Arduino
First things first: never use a delay when reading from serial.

You are just blindly trying to read data and send it out to another port. That's not going to work unless you know how much data you need to read.

And that information is handed to you on a plate - you just need to interpret it.

You are required to read the serial data as it comes in and decide what it means, then do different things depending on that data.  For instance, when you read the characters +IPD you know you have an IP Data response to be interpreted.  Just after that comes a comma, and following that a number. That number is how many bytes you then have to read to get your data. So you keep looking and reading until you have received all the data you should be receiving.