how to shutdown windows xp using php scripts

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
paul1
Forum Newbie
Posts: 1
Joined: Sun Sep 14, 2003 10:57 am

how to shutdown windows xp using php scripts

Post 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
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

ofcourse you can.


go to http://www.php.net and read about the exec function
unixchick
Forum Newbie
Posts: 11
Joined: Thu Sep 11, 2003 11:21 pm

Post 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();
Post Reply