2

I'm currently writing a tiny webapp for my HTPC (actually, a PC serving as both a media player and web- / fileserver) that will allow me to remotely control the playing of audio, without having to turn on my TV just to switch songs.

I'm using Windows Media Player as my audio player of choice, and I thought I could control it through PHP's COM Class. Unfortunately, I've not been able to find any documentation or examples on controlling WMP through this interface.

Can anyone point me in the right direction here? A second (and much less preferable) solution would be to use PHP's exec() call to start batch files that, in turn, control WMP.

Duroth
  • 6,315
  • 2
  • 19
  • 23
  • Any reason why you're not opting to use IIS and ASP(.net)? Might make your life a little easier. There are other premade options, like installing Boxee, etc. that will provide you with a web based interface also. – Braintapper Apr 19 '10 at 19:24
  • @Braintapper: Since I'm using the system as my home (development) webserver, I'm already running a WAMP setup. I'm not sure how hard it'd be to run IIS besides Apache, but together with the fact that I've got zero experience developing in ASP, it's a rather rigorous step for something so seemingly simple. – Duroth Apr 20 '10 at 08:23
  • 1
    IIS can run beside Apache pretty easily, but instead of reinventing the wheel altogether by writing your own controls, don't any of the XBMC variants like Boxee, etc. offer the functionality you're looking for? IIRC, the original XBMC on the 1st gen XBOX let me remotely control video and music playback with a web interface. I tend to think you'll get a better overall user experience using an XBMC-based front end. XBMC runs in Windows. – Braintapper Apr 20 '10 at 15:12
  • I'll check those out; Neither XBMC nor Boxee sound familiar to me. You might want to post this as an answer; considering XBMC or Boxee will do that I want it to, I'll accept your answer. For now, at least, +1 for pointing me in the direction of existing applications. – Duroth Apr 20 '10 at 16:50

2 Answers2

1

to run WMP from DOS or command line. check this out: Control Windows Media Player Behaviour with Command Line Parameters

there are some command line codes you can use to control WMP. you need to see WMP documentation for more info

Desolator
  • 22,411
  • 20
  • 73
  • 96
0

Not sure that wmp is the best program for that. Try vlc(You might have to look around a bit)

NebNeb
  • 339
  • 1
  • 4
  • 10
  • I'm using VLC for playing video. I chose WMP specifically so I won't have to reset my playlist in VLC everytime I want to watch a video. – Duroth Apr 20 '10 at 08:25
  • I was just thinking that wmp would be more of an user app. I mean an app which would be controlled by pressing buttons, made to look good for regular users. – NebNeb Apr 20 '10 at 15:01