Question

I would like to build a mini web app type page on my local machine where I can run CMD commands.

For example, my ideal set up would be over the Internet I can go to WANIP:1111, get prompted for user/pass and then be presented with a page where I can do things like reboot the machine and so on using commands such as shutdown.exe -r.

I'm basically looking for the functionality of the Web Interface option of the Shutter program by den4b but I'd like to build it and customize it myself. I'm also assuming that I wouldn't have to run an additional program to do it the way I described.

How would I go about creating this?
Do I need a certain server? Certain technology?

Was it helpful?

Solution

short PHP solution:

  1. Install Apache and PHP
  2. Secure it with htaccess
  3. Use exec to run commands

Here is discussion about how to shutdown a pc using php with working code. And here are instructions to change the port apache listens to.

That should be all information you need to install the server and build a php script with the desired functionality.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top