Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to put my windows 7 in virtual machine into sleep mode, shutdown and wakeup mode using php script.. is there any chances to do this??

Thanks
Siva
Posted
Updated 4-Jan-14 0:50am
v4
Comments
Nelek 4-Jan-14 6:51am    
This is a repost, but as the answers here are more valuable than the ones of the other post, please let this message live.

Other post: PHP code need to shutdown system[^]
sivamzcet 4-Jan-14 7:49am    
yesss i knw but i cant get the right solution.. but i made a correct solution just b4 :)

1 solution

What does this have to do with Linux, or MySQL ? PHP can't do this. It runs on the server, which I assume you don't want to put to sleep. It generates HTML, which runs in a browser. HTML and javascript cannot put a computer to sleep.
 
Share this answer
 
Comments
sivamzcet 4-Jan-14 6:15am    
u wrong.. we can do it one guy replied we can do this by using php system function
Thomas Daniels 4-Jan-14 6:46am    
If you use the PHP system function, you shut down the computer that runs the server. There is no way to shut down the computer of the client.
sivamzcet 4-Jan-14 7:57am    
we use system('shutdown -t -s ') to shutdown server.. it works :)
now we use system('shutdown -s -m \\vm -t 0') to shutdown virutal machine but it not works.. can u knw to shutdown a remotecomputer by using php?
Reply me
Nelek 4-Jan-14 8:08am    
Fully Offtopic: Congrats for your CP-MVP
Thomas Daniels 4-Jan-14 8:32am    
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900