Fblade1987 Posted October 13, 2006 Posted October 13, 2006 Hey Hack.5 team! Even though i only found out about your site and videos last night i must say i am already hooked :D , so much so im inspired to make my own sort of iptv (but thats a diffrent story) Anyways to my question! I just watched the season 1 episode where I think Darren(Dont shoot me if i got name wrong), was showing us how to make a web enabled object act as a remote for Vlc, and this got me thinking how can i make a script of somesort that can act more like a media center remote eg(Shut down task on pc, open a diffrent program, and even Turn off the pc), is this even possible? and could someone be kindenough to point me into the direction on how to achive the effect i want? Thanks so much for you time, keep up the good work Matthew Quote
CaveMan Posted October 14, 2006 Posted October 14, 2006 turning on the pc would hard (expecially if its the one running the webserver) Quote
Fblade1987 Posted October 14, 2006 Author Posted October 14, 2006 LOL yeah really dint think about that did i :roll: But is there anyway to do the rest? Quote
Sparda Posted October 14, 2006 Posted October 14, 2006 ye, just execute the command "shutdown -r". Quote
Fblade1987 Posted October 14, 2006 Author Posted October 14, 2006 ye, just execute the command "shutdown -r". Okies this is where i will get called "UBER n00b" here but how would you put that in php? Quote
VaKo Posted October 14, 2006 Posted October 14, 2006 If your on *nix there is webmin, fairly easy to setup and use. Quote
Fblade1987 Posted October 14, 2006 Author Posted October 14, 2006 NAH not knowledgeable enough to be able to use any *nix distro yet im still on windows would i have to use perl or something like that to achive the effect im after? Quote
Sparda Posted October 14, 2006 Posted October 14, 2006 Havn't coded any php in a month or two, but I remember it been very similare to C++ (or C), so it's probably some thing like: sy stem("shutdown -r"); but it might not be, but apparently it is. WTF?! I spent 20 minets trying to work out why this post wouldn't submit... and it turns out that the server returns a 503 error if you put valid php syntax in your post... btw. That "sy stem" in that block of code is ment to read "system", but if you write valid php code and try to submite it, the server returns a 503 error. Quote
Fblade1987 Posted October 14, 2006 Author Posted October 14, 2006 hey guys well i tried to start the script is this code right? <? $fire = sy stem("C:Program FilesMozilla Firefoxfirefox.exe"); php echo "<a href="$fire">Run fire fox </a>"; ?> thanks alot matt Quote
Sparda Posted October 14, 2006 Posted October 14, 2006 Yes... except, there is a problem with that... php on a windows box runs as system... so firefox will run as system... or are you just using that as an example program? Quote
Fblade1987 Posted October 14, 2006 Author Posted October 14, 2006 no im actually trying to load it but nothing seems to happen :cry: Quote
Sparda Posted October 15, 2006 Posted October 15, 2006 That would be becasuew apache, by default, is not allowed (as a service) to interacte with the desktop. If you open task manager, you should see that firefox is running as system. Quote
mpt Posted October 15, 2006 Posted October 15, 2006 What are you trying to do with firefox? If you want to use a PDA or phone to remotely control what you see on the monitor you might have a hard time. If you have a windows pocket pc, there is a vncviewer available for it, so you could control some of the stuff you see on the host monitor. If you are using firefox to try to download a webpage, take a look at curl--it is a library in php. Quote
Darren Kitchen Posted October 15, 2006 Posted October 15, 2006 open services.msc, edit the apache service, and set it to interact with the desktop. easy as pie, we did that for the vlc web admin proggie in 1x09 Quote
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.