# controlling certain parts of computer via webpage (powed by apache)



## aximbigfan (Jun 16, 2007)

hello all.

well, i got a new tablet pc. and you know what that means, i have my dell inspiron 6000 to use as a server !!.

so, a few things to know before i explain things,
*i plan on playing my hundreds of high res WMA over it, reason for this is that my speakers cable isnt logn enough to reach my tablet (i use it in bed).
*i loaded apache on and have done the following:
+created a docroot (that isnt default)
+installled in to a dir located at c:\apache\
+the docroot is at c:\http\
+i have configured .htaaccess, and httpd.conf so that the webpage is secure, even though it is intranet
*installed windows telnet server on it, 
*disabled simple filesharing, all sharing is authenticated via permissions

now, what i want to be able to do wit this webpage:
+control WMP (pause, stop, vol up, vol down, next, prev, mute)
+control power (reboot,shutdown)

so any ideas about how i am going to go about doign this?
i am experinced programmer, but i would like to make this as simple as possible

chris


----------



## Dippyskoodlez (Jun 17, 2007)

aximbigfan said:


> hello all.
> 
> well, i got a new tablet pc. and you know what that means, i have my dell inspiron 6000 to use as a server !!.
> 
> ...



I doubt WMP supports this.. 

Could just try VLC.


----------



## 3991vhtes (Jun 25, 2007)

aximbigfan said:


> i am experinced programmer, but i would like to make this as simple as possible


if you were "experinced" you would know what to do.


----------



## Dippyskoodlez (Jun 25, 2007)

3991vhtes said:


> if you were "experinced" you would know what to do.





I gotta say, this would be true.

You could maybe write a plugin for apache for something like itunes... or another media player that supports plugins.


----------



## aximbigfan (Jun 26, 2007)

Dippyskoodlez said:


> I gotta say, this would be true.
> 
> You could maybe write a plugin for apache for something like itunes... or another media player that supports plugins.



not exacly. i am experinced in local programming, not so much web/server interaction.

thats what i was thinking, code a plugin to listen for post data.


chris


----------



## pprodanov (Jun 26, 2007)

*ShoutCast*

You can try ShoutCast. Its a plugin for Winamp allowing you to broadcast online radio.


----------



## Deleted member 3 (Jun 26, 2007)

If you can control your player via command line you could use:

<?php
exec("command line thing");
?>

Very simple I'd say. I used it before to control a Windows service via http using net start/stop.


----------



## W1zzard (Jun 26, 2007)

DanTheBanjoman said:


> If you can control your player via command line you could use:
> 
> <?php
> exec("command line thing");
> ...



yup works like that basically. you create php scripts and execute system commands. this might be a very nice project to learn php. in my experience php is one of the easiest languages to learn. there's tons of sample code out there and the documentation (www.php.net) is top notch


----------



## aximbigfan (Nov 14, 2007)

Hey thanks W1z and DTBJM!

I forgot about this thread and struggled with using .bat scripts in my cgi-bin dir. I just now found this thread, and the exec suggestion works perfectly! 

Chris


----------



## W1zzard (Nov 14, 2007)

make sure you protect your exec arguments so someone doesnt execute _deltree /y C:\MySecretPornStash_ on your system


----------



## aximbigfan (Nov 14, 2007)

W1zzard said:


> make sure you protect your exec arguments so someone doesnt execute _deltree /y C:\MySecretPornStash_ on your system



Lol, I alreay have. The entire site is password protected and behind 2 firewalls from teh internetz.

chris


----------

