Reputation: 37177
I'm making a small on-line clock (both for fun and to learn a bit more of PHP and JavaScript) started it because I actually need an alarm clock and this would be easier than buying one (don't ask)
Now I wanted to know one thing, I know it's impossible to turn on/off you're computer from a browser, but a friend asked me if I could do him a small addon/program that would fetch the alarm time he added there, and would turn his computer on so it would let it wake up.
I know turning on must be pretty much impossible, but turning on from sleep/hibernate maybe?
Anyone knows any API to do this? Windows or Mac, or cross platform.
Just for curiosity the alarm clock is here http://www.my-clock.net
Edit:
On the wiki page, wake-on-lan says it requires to turn the BIOS power to the network-board, is there any way around this? Or are today's computers already ready for this kind of protocol?
Upvotes: 0
Views: 1334
Reputation: 2696
There could be two solutions:
Both would work even if the computer is completely powered-off.
Upvotes: 6
Reputation: 17235
Once a OS goes in hibernate/sleep the only way to bring it up is through some kind of kernel level hardware driver event. for example pressing power button or opening the lid of the system etc.
IMO it would be bit complex to model the functionality within an application, as application is dependent on OS level services, that are not available in sleep/hibernate mode.
Upvotes: 1
Reputation: 107000
As people have pointed out, Wake-On-Lan is one possibility. But there's another one that might suit your need. Most BIOS'es today already provide an option to turn your computer on at a given time. If your goal is simply to turn your computer into an alarm clock, this should do the trick.
Upvotes: 0
Reputation: 17118
I don't know a lot about how it works, but it sounds like you need Wake-on-LAN
Wake on LAN (WOL, sometimes WoL) is an Ethernet computer networking standard that allows a computer to be turned on or woken up remotely by a network message.
Upvotes: 0