View Single Post
Old 2005-03-15, 08:13 PM   #33
Opti
I Didn't Do It
 
Opti's Avatar
 
Join Date: Aug 2003
Location: au
Posts: 795
Send a message via ICQ to Opti
Quote:
Originally Posted by cd34

There is another way you could do it using php which is a bit different.

If you serve the gallery, you have the IP address of the surfer (or at least the publically available address that they would be sucking the file down from anyhow). You could put the page in a directory and the videos in a subdirectory. When the page is served, you would take the current surfer's IP and append it to the end of the .htaccess in the videos subdirectory along with some timestamp so you can clean it later. If you aren't using php to serve the page that the surfer sees, and I usually dislike using dynamic pages, you could wrap an img src so that it would write the file.
..........................
CD or Andrew or Anyone.. does this sound feasible as a solution?

To make sure no one can view the video without having viewed your site first.. When the video file is requested, create a sym link on the fly, probably an md5 hash of their IP and browser agent.

Then just delete all symlinks every hour or day or whatever period to suit the situation.

(that's a simplified description but hopefully you see where I am coming from and know if it's feasible)


PS.. you guys should be careful Under-Estimating young Andrew.. you might be surprised to find out what and who he has been employed to code for in the past. ;-)


*edit:
Quote:
Originally Posted by Alex
Have you considered putting your videos in a directory that in NOT accessable from the outside at all (not in the domain, but in a seperate folder somewhere on the machine) using htaccess to redirect all regular requests of a small cgi to check refering page and such? That cgi could then serve the file transparently, and it would never be accessable from the outside (no direct link except through the CGI).
oops.. missed this... yeah something like that.. but without the CGI or extra checks and stuff. (which shouldnt be needed imho.. as we only want to make sure they see our website to view ads before seeing the vid as the basic function)
Opti is offline   Reply With Quote