ESP8266 send number in IP address
First of all use the event function server.on with a path that corresponds to your function and use a url like this:

192.0.2.2/recordnumber?num=100


With a url parmeter for your number. Your code might look like this:

At the top:

int nums_size = 0;
const int nums_max = 128;
int nums[nums_max];


In setup:

server.on("/recordnumber", [](){
    int num;
    if(server.hasArg("num")) {
      String num_str = server.arg("num");
      if(num_str.charAt(0) == '0') {
        num = 0;
      } else {
        num = num_str.toInt();
        if(num == 0) {
          server.send(400, "text/plain", "not a number");
          return;
        }
      }
      if(nums_size &lt; nums_max) {
        nums[nums_size++] = num;
        server.send(200, "text/plain", "saved");
      } else {
        server.send(500, "text/plain", "full");
      }
    } else {
      server.send(400, "text/plain", "bad params");
    }
});