I'm doing a project on Energy saving in PCs. I'm doing a web application using PHP. I need to do a PC shutdown but the codes i've tried does not work. Anyone have a soultion. PC shutdown in WIndows 2003- vista. These are the code tat i found.
[code=php]
<script language="javas cript">
import java.io.*;
public class shutdown
{
public static void main(String[] args)
{
try {
Runtime.getRunt ime().exec("shu tdown -s -t 0");
}
catch(IOExcepti on e) {
System.err.prin tln(e) ;
}
}
}
</script>[/code]
tks in advance!
[code=php]
<script language="javas cript">
import java.io.*;
public class shutdown
{
public static void main(String[] args)
{
try {
Runtime.getRunt ime().exec("shu tdown -s -t 0");
}
catch(IOExcepti on e) {
System.err.prin tln(e) ;
}
}
}
</script>[/code]
tks in advance!
Comment