Have a PHP page that is secured with a login form.
Upon authentication, the user is presented with several links to Real Video files. The links are in this format now:
rtsp://real.mysite.com/a001/videos/apr1.rm
rtsp://real.mysite.com/a001/videos/apr2.rm
rtsp://real.mysite.com/a001/videos/apr3.rm
...
I need a script that does the following:
Each time a link is clicked on, it renames the folder "videos" to some random 6 to 10 digit name (e.g. hyn42fd1op), then serves the file to the user from this new location.
This way, if the user bookmarks this link as:
rtsp://real.mysite.com/a001/hyn42fd1op/apr1.rm
It will only work until the next video file is requested by the same or another user.
The files are located on an FTP server. The root folder contains the "videos" folder.
I imagine I would have to create a separate PHP file that does this... meaning it receives some ID, then based on the ID does all the folder renaming etc. and serves the new link to the user.
Please provide source code for this problem, OR please provide a more effective solution if you can think of one. Ultimately I want to prevent users from bookmarking these Real Video files and forcing them to login to that page.
Thank you!