I am working on small web application that am using to turn a lamp on and off through internet. In case the lamp is on it shows on Lamp image, else it shows off lamp image. I am thinking in this procedure to implement this application: 1- I create an html file on server called lamp.html 2- Every 5 sec the lamp controller circuit send http data to a php server application which takes the data and opens the lamp.html file and rewrites the html file with the new data recieved from the lamp controller. Example: If the lamp is on, server application writes to lamp.html file an image tag with an image of ON lamp, and so on. 3- I request the lamp.html file from the browser . ex: http:mysite.com/lamp.html the file has auto refresh every 5 sec.
Is it good procedure to implement? Is there another method that i can use to make remote control using http request?
