Page 1 of 1

how to shutdown windows xp using php scripts

Posted: Sun Sep 14, 2003 10:57 am
by paul1
hi

i want to know if i can shutdown and restart windows xp using php code eg for a admin control panel


thanks

Posted: Sun Sep 14, 2003 11:24 am
by m3rajk
ofcourse you can.


go to http://www.php.net and read about the exec function

Posted: Sun Sep 14, 2003 11:47 am
by unixchick
I dont think you can do it with exec();, on windows 98 you can shutdown
by using exec("rundll user,exitwindows 0"); but on xp... all i would know how to do would be lock the computer, but... you can use php's w32api to move the mouse and click so it _is_ possible... or you could simply call a third party tool using exec();