When it comes to control devices using the Internet, some key factors come to play. Firstly, is the technique to be used. There are lot of techniques in this field. A quick workaround is the use of REST services, such as HTTP GET requests, where we get data from an existing database.
Some of the workarounds are discussed here.