We are adding streamed media to our website using a third-party service.
The basic workflow is intended to go something like this:
- User logs into our site
- User clicks a link to load a streamed podcast / video.
- The link points to a PHP script that verifies that this user has access to the requested resource.
- The php script exits and the stream is delivered to the client.
Our streaming media files will all be uploaded to the third-party service as flv's and played from the longtail player.
My question is regarding steps 3 and 4 above. How do I authenticate against a server side script, then allow the stream to be delivered without having the PHP script run forever which would greatly increase the load on our server?