Coding part of ESP8266

That doesn't matter. Program your ESP8266 with a sketch that reads the number from the serial port, and send it to the server (sending to the server is explained in one of the examples, you just have to implement the serial part). Then connect it to your Arduino via serial, and send the number from your Arduino.