Here is a basic tutorial on how to control ESP8266 over the internet using two buttons on a browser window. The article goes through Arduino IDE configuration and example code is included.
There are but a few things better than (succesfully) programming and using your Arduino. Surely one of those things is using your ESP8266 as an Arduino with WiFi!
Control ESP8266 over the internet – [Link]