Sending sensor data to web app via ESP8266 ???

I want to know if its possible to send sensor (accelerometer) readings to a web application via ESP8266.

I'm making a Smart Pillbox as my final year project and I'm planning to attach the accelerometer to the lid of the box. The accelerometer will be interfaced with an Arduino Uno, and the ESP8266 will be connected to the Arduino as well.

So what I'm trying to do is, take the accelerometer readings and transmit that data to a web application, via ESP8266.

Is it possible to code the Arduino in a way that it takes the data from the sensor, and then transmit this data, via ESP8266, to the web application?

Your help will be really appreciated.

I want to know if its possible to send sensor (accelerometer) readings to a web application via ESP8266.

You can send data to a script on a server. If that script is a "web application", then yes.

Is it possible to code the Arduino in a way that it takes the data from the sensor, and then transmit this data, via ESP8266, to the web application?

Yes, it is. But, what is the web application going to do with the accelerometer data?

Seems to me a simple switch (was the box opened?) would be better than an accelerometer. Shaking the box is going to produce a boatload of data, and still not tell you if the lid was opened.

If you have an ESP8266, why would you use an Arduino?