Switch state using WiFi

Can you use the ESP8266 to send the state of a switch connected to one of its inputs to another WiFi device such as an Ipad using the Arduino IDE.

A small sample of code needed would be greatly appreciated, thanks.

I have found a pretty good example that works for me

//see ESP8266 Thing Hookup Guide - SparkFun Learn

This does what I want and a lot more than I need.

I can now observe the state of a switch on the ESP8266 using an Ipad.

All I have to do now is work through the example and understand the code.

regards