Jump to content

Getting video to a users browser


rondog

Recommended Posts

I have a mobile app. They visit a web site where they login. The videos live above web root, thus making it impossible for anyone to directly link to the video file. On iOS, I made a PHP script that checks if they are logged in first and if they are I use a range download method that acts like streaming. Works great! On android however, the script isn't working..lame.

 

So I was trying to think of other methods to deliver the video, but first checking if they are logged in. My idea was to check if they are logged in, if they are, copy the video from above web root to a temp directory in web root and give it a uniqid name and insert it into the DB. That ID will then expire after two hours and I would delete the video.

 

Ok that sounds like it would work for both phones, except with high traffic, that could be problematic.

 

My next idea was symlinks, but I don't know much about them other than they are a shortcut. Could I potentially use a symlink to give the logged in user a video file that lives above web root?

Link to comment
https://forums.phpfreaks.com/topic/230122-getting-video-to-a-users-browser/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.