dsaba Posted March 12, 2008 Share Posted March 12, 2008 All of you have heard of video hosting sites like youtube, and similar websites that utilize flash based video players to stream video data to the user are multiplying like crazy. I'm wondering if it possible to remotely interact with these flash video players with PHP, I know that you can use PHP to open up sockets and send HTTP requests like POST or GET, but how to interact with flash objects.. I'm clueless. ----------------------------------- I would like to know if possible how can I use php to interact with a flash video player and "push play" on it so can receive the video stream/capture this video stream. ------------------------------------------ Well if you're asking why not just look in the source for the the flv file it is linking too and there is my "video stream." The flv file is not always listed in the sourcecode and usually it is dynamic, the embed flash player sends some unique vars/session ids maybe to get it to play a certain video. So it's not that simple always.. I've done some of my own investigating with WireShark on this website: http://www.tudou.com/programs/view/hW0s3K4cnRw/ All I notice while the video is playing is a TCP transfer of data from the host site to my computer. So any ideas? Thanks for looking. Quote Link to comment Share on other sites More sharing options...
dsaba Posted March 13, 2008 Author Share Posted March 13, 2008 bump Quote Link to comment Share on other sites More sharing options...
trq Posted March 13, 2008 Share Posted March 13, 2008 I would like to know if possible how can I use php to interact with a flash video player and "push play" on it so can receive the video stream/capture this video stream. So your looking for ways of ripping content? Your question really can't be answered definately. It depends on the player itself and what types of requests it expects. If the player in question has a defined API that reponds to http requests then yes, it will be quite simple. If however the player in question has been built with the intention of hiding its functionality, your going to be pushing shit up hill. Quote Link to comment Share on other sites More sharing options...
rofl90 Posted March 13, 2008 Share Posted March 13, 2008 Well said. Quote Link to comment Share on other sites More sharing options...
dsaba Posted March 13, 2008 Author Share Posted March 13, 2008 my question isn't about flash players that have defined apis, if they have defined apis well the answer is simple then... use the defined api! Why would I ask something so obvious? If however the player in question has been built with the intention of hiding its functionality, your going to be pushing shit up hill. I don't really know what you're trying to tell me, your opinion on my question? How does this help me? Maybe you don't want to help me. The root of my question is this, everything that happens on the computer has triggering events, if event A happens, then event B will happen. It doesn't really matter what it is, whether it be a flash player or program. When it comes to the internet and internet applications (websites, flash objects..whatever) There is a definite communication between the host server of the application and the client computer that is using it, (me). It seems to me that a triggering event to start streaming a video from one of these flash based video players is some kind of TCP stream of data, that is when you push the "play" button some stream of data gets sent to the flash object to tell it to begin streaming video to the client. All I want to do is emulate the original communication between client and server, but with PHP. I'm aware of some functions like fsockopen() etc.. If I can identify what data needs to be sent in order for it to start streaming video, and under what protocol and all those other specifics, can't I use PHP to send this request, and then simply read the response? This is the same thing that happens when you send HTTP requests and you get the sourcecode/headers of a webpage (aka: the response). This is what my question concerns. Any ideas, or possible methodology on something related to this? You also say it depends on the player itself, well I gave you an example player in the link. Quote Link to comment Share on other sites More sharing options...
trq Posted March 13, 2008 Share Posted March 13, 2008 I don't really know what you're trying to tell me, your opinion on my question? How does this help me? Maybe you don't want to help me. Sorry mate, not trying to give you greif about your question, and I'm not sating its impossible. I'm from Australia, the term 'pushing shit up hill' simply meens its going to be hard work. The likely scenario of how these flash players work (I still haven't view the player in question) is that pushing the play button simply tells the falsh client to move to a certian frame and execute the actionscript within it. The actionscript is then likely to make a request to a server-side script which would respond with the location of the movie to play. This movie can then be loaded into the flash player and the player can begin to play it while its still loading the rest of the file. If you can find out what the location of the server-side script the flash file makes requests to and what arguments it passes you may be on your way. This is likely a simple http (either get or post) request. Other that, I can't really help. Your going to need to do a fair bit of investigating to find out what the flash client is sending to the server. Its also not unheard of for these types of comunications to be using there own protocol. Quote Link to comment 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.