skay_t Posted April 2, 2007 Share Posted April 2, 2007 Hi guys, I need to be able to play windows media files on a server to test validity of streaming URL's and whether the file actually plays. This needs to be done serverside (so a check can be run nightly / hourly) so I thought I might use phps COM object to load the windows media player and use the exposed methods to do this. Basically all I will need to do is: check the address doesnt return a 404 etc (easy) check the videos duration. Can someone point me in the right direction to actually using the Windows Media Player with the COM object? I dont know where to find a list of available applications that can be exposed through the COM object, Ive tried a host of options to load the player: $wmp = new COM("WMPlayer.OCX"); $wmp = new COM("WMPlayer.Application"); $wmp = new COM("mplayer2.application"); $wmp = new COM("x-mplayer2.Application"); etc with no luck OR suggest an alternative idea / method? If I cant do this easily I will write a c++ console app to do it but would like to keep it within php to allow easy maintenance / upgrades later on. Link to comment https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/ Share on other sites More sharing options...
trq Posted April 2, 2007 Share Posted April 2, 2007 I would suggest you start looking over at http://msdn.com, good luck though, MS aren't renowned for writing good documentation. Link to comment https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/#findComment-220207 Share on other sites More sharing options...
skay_t Posted April 3, 2007 Author Share Posted April 3, 2007 Spent most of yesterday there and following many links on google looking for a solution so thought I would try here before working on a separate console application as a resolution. Thanks. Link to comment https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/#findComment-220225 Share on other sites More sharing options...
trq Posted April 3, 2007 Share Posted April 3, 2007 I'm not sure you'd have much luck here really, its much more a com object question, php just provides the interface to that object. I know there used to be a tool available (i'm sure I got it from msdn) that would scan all your com objects and display a list of properties and methods, but that was a long time ago when I was still using windows. Link to comment https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/#findComment-220228 Share on other sites More sharing options...
jitesh Posted April 3, 2007 Share Posted April 3, 2007 Just Download and view the attached script [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/#findComment-220316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.