rondog Posted March 9, 2011 Share Posted March 9, 2011 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? Quote Link to comment Share on other sites More sharing options...
btherl Posted March 9, 2011 Share Posted March 9, 2011 Yes you can, as long as your web server is configured to allow sym links for that directory. If you're using apache it's the FollowSymLinks option. You can create them with the php function symlink() 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.