pilotdave 0 #1 September 22, 2005 Ever want your buddies to check out a video on SkydivingMovies.com but those bastards are too lazy to register? Well, now you can give them a Guest Pass. Just go to the video you want to share and hit "Create Guest Pass." This creates a special page where that video can be downloaded up to 50 times. You can send the link to your friends, they can check it out, and once the 50 downloads are used, well, that's it. Some people used to cheat and send out direct download links to files on the site. I don't like that. It turns the site into just a big online hard drive. Well I closed that little security hole at 2am this morning, with a stroke of brilliance... or something. So I figured I'd give another option. BTW, it's still in testing so let me know if you find any funny behavior. So what do you think? Think you'll use it? Think 50 downloads is a good number? Anything else? Dave Quote Share this post Link to post Share on other sites
bob.dino 1 #2 September 22, 2005 Sounds cool! One feature request, if I may. Right-clicking on a file, then selecting Save As leaves me with a dialog box in which the suggested file name is "pafiledb.php". I then need to overwrite it with the proper name. Validated on WinXP with Firefox 1.5b1, and IE 5.5, and on Win2K with Firefox 1.06 and IE-something-or-other. Is there any chance you could do some fancy stuff so that the real filename appears? A URL of the following form would work: http://www.skydivingmovies.com/ver2/download/collison.mov or http://www.skydivingmovies.com/ver2/download/collison.mov?my_other_vars You could probably even use URL rewriting in Apache to do: http://www.skydivingmovies.com/ver2/collision.mov?action=file&id=2706 ...just replacing the reference to pafiledb.php with the name of the file being downloaded. It'd make downloading files significantly easier. Thanks for providing a wonderful resource! Quote Share this post Link to post Share on other sites
pilotdave 0 #3 September 22, 2005 For me, it works fine in IE but not in firefox. I did solve that problem a while ago but it caused a major memory issue... long story, but it caused the server to crash repeatedly. I'll work on it some more... not really sure why it does that but it's probably easily fixable. When my "perfect" download solution turned out to kill the server, I was too pissed to think about it for a while. BTW, if any REAL web page design geeks can tell me why fpassthru causes the entire contents of the file to be loaded into the server's memory and a solution to it, I can fix this real fast. Dave Quote Share this post Link to post Share on other sites
bob.dino 1 #4 September 22, 2005 You shouldn't need to go near PHP: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html Quoteif any REAL web page design geeks can tell me why fpassthru causes the entire contents of the file to be loaded into the server's memory The docs imply that it's by design: QuoteReads to EOF on the given file pointer from the current position and writes the results to the output buffer. Quote Share this post Link to post Share on other sites
pilotdave 0 #5 September 22, 2005 BTW, in case anyone noticed that downloads weren't working at all for a while, it's because I am an idiot. In implementing this new Guest Pass feature, I managed to delete the 3 lines of code that make downloads, well, download. I put them back now. OOPS! Dave Quote Share this post Link to post Share on other sites
Buried 0 #6 September 22, 2005 Quote implementing this new Guest Pass feature, I managed to delete the 3 lines of code that make downloads, well, download. I put them back now. OOPS! lol. I'll have to check out the guest pass thing sometime. thanks dave! Where is my fizzy-lifting drink? Quote Share this post Link to post Share on other sites
jdfreefly 1 #7 September 22, 2005 That is a really good idea. Unless you are stealing the idea from someone else's site, you should patent that, before Amazon does. Methane Freefly - got stink? Quote Share this post Link to post Share on other sites