So would like to do: get an flv file from a protected directory and feed it to a swf embedded player as a parameter using PHP.
Is this possible?
Sending the contents of the file to the embedded player does not seem to work.
So would like to do: get an flv file from a protected directory and feed it to a swf embedded player as a parameter using PHP.
Is this possible?
Sending the contents of the file to the embedded player does not seem to work.
Well, since the player requires that the client fetches both the player and the FLV from the server, I suspect that this would require a temporary location from which the FLV is made accessible to the user via a URL. The most obvious solution is to create an expiring URL that times out in a reasonable amount of time, preventing users from linking directly to the FLV. I'm not sure if there's a way to keep it protected beyond this without embedding the address to the file in the flash itself dynamically - basically, you can't use a general purpose player that takes a URL for the FLV as a parameter if additional protection is required.
Edit: Here is a potential solution using the JW player: Code URL in V4 for protection against leechers
And here is another possible solution along the lines of my original comment: Flashcomguru.com: 'Streaming' flv video via PHP, take two
Not sure what you mean with "feed it to a swf embedded player as a parameter using PHP", but looks like what you want to do is this:
If that is what you want, the part of the script in 2 that reads and serves the flv should be pretty straight forward using the standard file accessing functions from the PHP API and setting the appropriate content-type header before echoing it out.
see this thread: http://stackoverflow.com/questions/558653/how-do-you-hide-the-url-of-the-flv-file-in-a-flash-player