Answer the question
In order to leave comments, you need to log in
How to stop accepting orders on the site when the computer is turned off?
There is a website for ordering food. It is necessary to signal to users about whether there is now someone or not at the reception of the order. It is necessary to become attached to the work of the computer or to the activity of Gtalk.
That is, if the computer is turned on, then the site knows that it is possible to take orders, but the lights were turned off, for example, and everything on the site automatically closed.
Answer the question
In order to leave comments, you need to log in
Isn't it easier to just make a button: accept / not accept orders?
why such perversions?
turning off the computer is easier than pushing a button?
Write a service that will call the site.ru/i_am_online page from the computer once a minute, which in turn will access the database, and the site will take from the database, that if there is no activity for two minutes, then we do not accept orders ...
You are not solving the problem. It is necessary to solve the issue with constant access to the Internet, which will be cheaper than a mega service that will interrogate your computer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question