By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Web based system management software

P: 2
Is there a simple web based intelligent system like alarm or automatically shutting down pc within certain time? I am looking for an application that is PHP.
Mar 13 '10 #1
Share this Question
Share on Google+
5 Replies


Atli
Expert 5K+
P: 5,058
Hey.

Shutting down a computer via a web-based system (by which I mean; a browser based website) is not possible. At least not by using the website alone. You would need a 3rd party client-side language, like Java, to accomplish that.

Not sure what you mean by "alarm", but if you just mean a clock that beeps, or something like that, that shouldn't be a problem. Although, using PHP would be less than ideal. JavaScript would be a better language to use for such a thing.
Mar 14 '10 #2

P: 50
Well you can always tell the computer to shutdown but you can not tell PHP to shutdown the computer but you can execute system commands so...
Windows
Expand|Select|Wrap|Line Numbers
  1. exec( "shutdown -s" );
  2.  
Linux
Expand|Select|Wrap|Line Numbers
  1. exec( "sudo shutdown -h 5" );
  2.  
Mar 15 '10 #3

Markus
Expert 5K+
P: 6,050
Of course that will shutdown the box that PHP is running on. Unless this application is running on the client box, then I doubt this is the way to go (shutting down a web-server could be a problem :P)
Mar 15 '10 #4

P: 50
Well I don't see Windows or Linux being all "Okay stranger you can shut me down" lol. And yes that would be a pretty big problem but I figured he was using it on his development machine. If your trying to shutdown a different computer remote management is the only real option I can think of. If your on Windows you can always find the correct COM object for doing just that Linux well I'm sure there's some open source software that you can have PHP use.

EDIT:

If you are using a server and want to shutdown your client ( which you have complete access to ) use a socket server to have PHP send a message to at the correct time and then take your actions from there. Sockets in C are pretty easy to understand on Linux I've never written anything with sockets on Windows I'm sure its about the same but Windows uses there own sockets interface rather then the Unix socket "standard".
Mar 15 '10 #5

P: 2
thank you so much guys for your explanation.really appreciate that!
Mar 16 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.