Entry
How can windows (XP Pro) be shut down/ restarted via PHP?
Feb 27th, 2008 00:05
dman, taylor gerring, Matt Barley, http://www.ttnr.org
you can use php to execute a system call several. This first and more
common is through the use of the system() function. It exectures the
string argument and returns the output. for example, to show the
output of an dir on a windows machine (or an ls on a unix box), you
might try something such as this:
echo system("dir");
additionally, php can execute system calls through the use of
backticks (echo `dir`;) and a number of other methods which can be
found at http://www.php.net/manual/en/ref.exec.php
you will have to find out the command to execute on a windows system
that issues the shutdown process a simple google search should turn up
the right results