This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CaptiveCreeper's profile picture

Controlling Computers from a LAN HTTP Site

Started by CaptiveCreeper, 08 May 2015 - 03:42 AM
CaptiveCreeper #1
Posted 08 May 2015 - 05:42 AM
I have always wanted to control my computer craft scripts from my phone. I was searching the internet and found this video https://www.youtube....h?v=E-BhJeeslPY that did just that. But the problem is he did not explain how to change or add any other parameters. I do not know very much at all about html or php and would appreciate the help. Please and Thank You.
InDieTasten #2
Posted 08 May 2015 - 03:52 PM
I'm not sure, on what type of answer you expect, so I am just going to explain to you, how such a system can work architecturally:
In your example, you have two clients, and one server.
One computer and your phone/(or basically any web browser) have the role to be client.
Then you need to host a web service, which is playing the server role.

Your server will need to have 2 interfaces: one, to access the current states(of whatever you are wanting to control) for the CC-computer, and another one for your phone to change these states.

You computer will then contact the server via http-api in a set interval(for example every 3 seconds) and check for any changes of states.

So now you know how the setup itself works. Explaining the implementation is a whole different thing, since you can do it in many ways, from simple to high-end front-ends with single pageload and what not. So I'll leave that for others to explain :)/>