raizur Posted October 29, 2012 Share Posted October 29, 2012 Could someone please help with this issue, Is it even possible to write a script that would send a magic packet to a pre determined computer upon loading of a web page. My purpose is this. Apache server at my office goes to sleep. Someone opens a "cover web page" that runs a short flash video while a script sends the magic packet in the background to the apache server. When flash animation is over the "cover page" redirects the viewing computer to the apache server. Any and all help including links for technical reading is very appreciated. Thankyou. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/ Share on other sites More sharing options...
Christian F. Posted October 29, 2012 Share Posted October 29, 2012 If I were you, I'd rather configure the server running Apache not to go to sleep. Sleep mode is for desktop computers, not servers. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388545 Share on other sites More sharing options...
raizur Posted October 29, 2012 Author Share Posted October 29, 2012 this is a prerequisite to the setup. The server only gets used a few times a week but must be able to be accessed at any time from anywhere. Leaving it on is not an option in this scenario. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388559 Share on other sites More sharing options...
ManiacDan Posted October 29, 2012 Share Posted October 29, 2012 A few times a week? There must be a better solution. There's a "Wake-On-Lan" feature of most desktop motherboards, but as was said earlier, servers don't sleep. You could also run it in a VM on an existing server which actually IS on all the time. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388562 Share on other sites More sharing options...
raizur Posted October 30, 2012 Author Share Posted October 30, 2012 Ok my mistake in doing this and I do know better.... I will be more specific. There is a desktop pc being logged into a few times a week by co-workers in other citys. This is a small bussiness so we dont have a large I.T. department. The server is a web forum where each employee fills out several forms. The bussiness is trying to cut back on expenses. Specifically speaking electricity for one. For that reason we want the pc serving this web form asleep and able to be woken up remotely via W-o-L (wake on lan) which requires a "magic packet" to trigger a W-o-L enabled NIC to send a wake signal to the MoBo. I have a REAL server running off site for unrelated purposes. My ultimate goal here is to host a very simple web page for people to open from anywhere with any browser and display a "loading" animation while in the background (not seen by viewer) a magic packet sender or something similar would dial the desktop hosting the web form from the office sending the magic packet to wake that desktop up. Then a 15-30 second delay (the animation seen by the viewer) followed by a redirect to the web page on the desktop running at the office. I know this sounds a little round about but its what I'm asked for.... Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388573 Share on other sites More sharing options...
kicken Posted October 30, 2012 Share Posted October 30, 2012 I have a REAL server running off site for unrelated purposes. Why not just move whatever content is on the desktop PC onto this server? They you don't have to try and come up with some weird solution to turn the PC on upon request. For that reason we want the pc serving this web form asleep and able to be woken up remotely via W-o-L (wake on lan) which requires a "magic packet" to trigger a W-o-L enabled NIC to send a wake signal to the MoBo. A WoL packet has to be sent on the local LAN, which means you can't send it from a host on a different network. You're going to have to have at least one device somewhere on the lan online 24/7 in order to send the packet from, and a way to tell that device to send said packet. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388580 Share on other sites More sharing options...
raizur Posted October 30, 2012 Author Share Posted October 30, 2012 I did not realise that WoL had to be over LAN exclusively. With that you may have made it alot easier to convince the powers that be on this that its imposible..... Im gona push them for an off site solution with a host. Thanks for the inputs. Quote Link to comment https://forums.phpfreaks.com/topic/270045-send-magic-pack-to-pc-from-webpage/#findComment-1388606 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.