I posted here a few weeks back, but my pi crashed and I'm starting over. My project is fairly simple, at least for someone who knows programming. I will run an Apache2/php webserver on the pi and allow users (clients?) to access it through a webpage. This is to open and close a driveway gate, the page will have one button to cycle the gate (input), two LEDs for open & close verification, and a progressbar (outputs) to show it's position while traversing. I had a thread here a couple weeks ago about it, but it turned into a security issue thread. This is what my finished html index file looks like:
Being a complete newbie, I need to admit I "stole" a lot of code from tutorials and "tips" pages but still need a lot of help with the "communications" part. BTW, I don't even know how to get info moving beween the pi | N-R | and Apache2's index page!
How to get my index.php page to listen for commands to/from pi?
What protocols to use for this?
How to get the button (Bootstrap), ver. lights (SVG), pg bar (JS) to work?
How to allow only one user at a time and have that user time-out after xx seconds?
How to get UN/PW info from the client to the server?
And most of all - I've been all over Google for days and it seems there's no way to utilise my close (X) button to kill the tab - unless - that process created it and you have the window handle to work with. Since that is the case, can my index page be a "redirect" to another page where I can intercept it's handle?
I know this is a lot to ask in one Q, but anything to get me started will be appreciated!