Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

bastard leechers

Name: Anonymous 2008-09-26 0:29

I want to stop hot linking on large files but don't want to use HTTP REFERER (or any other .htaccess crap). I was thinking something like domain.com/downloader.(php|py|pl|whatever)?file.avi and that would spit out domain.com/(some empty dir)/hash of ip+date+secret+whatever/file.avi.

The link being a symlink to the file out of the docroot (say /home/bah/repository/file.avi).

And the links (and thus symlinks) expire after an hour-ish. Does this sound sane? What about best ways to implement this?

Name: Anonymous 2008-09-26 0:39

sounds sane if
>The link being a symlink to the file out of the docroot (say /home/bah/repository/file.avi).
works and you know a way to delete the symlinks after some time. Maybe use the php script direct to send the right headers for the file and then the file content instead of creating a symlink? But don't know if your scrips is allowed to access docroot and if you can send a file through a php script itself.

Name: PHP 2008-09-26 1:06

Pimp Hoes Pawa

Name: Anonymous 2008-09-26 1:32

streaming a file through the app is a no-go for many reasons.

first being the web server will always be faster and more efficient then an app can ever be.
second, i'm not going to tie-up 5-15 processes streaming files.

Name: Anonymous 2008-09-26 1:38

>>1,4
Your ignorance of web server operation is truly magnificent.

Name: Anonymous 2008-09-26 2:37

>>5
Well, >>1 did post it to /pr/ with no responses about a week before they posted it here.

Name: Anonymous 2008-09-26 3:04

Location: headers would still give away the file location. I want to make it impossible to link to the file afterwards.

Name: Anonymous 2008-09-26 3:48

>>7
Maybe offline storage is what you're looking for. That way nobody can leech your files.

Name: Anonymous 2008-09-26 12:57

>>1
Yeah, it'll work fine as you described.

* All unleechable content (ie, anything over 100MB) is stored outside of the www tree.

* Access to content is mediated by a ``download'' script which temporarily symlinks (but does not serve) the desired content into the www tree (with a unique random identifier). It then redirects the client to the symlinked content with a Location header.

* Have a cron script remove all stale symlinks (ie, symlinks that are older than X minutes). man find.

There's a couple reasons why you don't want to serve the files out directly through a scripting language, and it's not a matter of tying up a daemon like >>4 suggests (because a daemon is still going to be tied up if the server services the request directly).

The big gotcha is that the web server is going to use the sendfile syscall (if your OS supports it) which your scripting language probably won't have access to. So your script has to read the file into memory in chunks, then dump the chucks out to the network. sendfile effectively offloads that process to the OS, and data gets dumped off the disk and onto the network.

The other reason is that there's a bunch of other random shit, like Range headers that you'll have to parse to get everything working right. If you don't handle those, your clients won't be able to use multiple streams or resume broken downloads (though arguably, the symlink system would make resuming broken downloads non-trivial for most of the shit people use).

>>7
You have to give away the file location if you don't want to have a script delegating the transfer (though most languages provide a sendfile function, where supported). In the situation above, you're actually giving away the location of a temporary symlink which gets deleted after X minutes.

Sage for newfags and their stupid ``DOWNLOAD FREE ANIME'' sites.

Name: Anonymous 2008-09-26 15:25

Lighttpd can do this out of the box. Realize the error in your ways and convert to a good web server, not just an ENTERPRISE QUALITY one.

Name: Anonymous 2008-09-26 16:07

I want to stop hot linking on large files
Upload them to Rapidshare/Megaupload/whatever. That's what they're there for.

Name: Anonymous 2008-09-26 17:55

>>10
Doesn't lighttpd require a license now?

Name: Anonymous 2008-09-26 18:28

>>12
A BSD license?

Name: Anonymous 2008-09-26 18:30

>>10
Enjoy running PHP through FCGI, faggot.

Name: Anonymous 2008-09-26 19:22

>>10
shared hosting so i'm fucked, i wouldn't need to ask if i had the option of secdownload

Name: Anonymous 2008-09-26 20:08

>>1
The information wants to be free!

Name: Anonymous 2008-09-26 20:09

Password protect your images.

Name: Anonymous 2008-09-26 20:21

>>14
Enjoy running PHP, faggot.

Name: Anonymous 2008-09-26 21:28

>>18
I will, along with my job.

Name: Trollbot9000 2009-07-01 9:53


You're talking about but.

Name: Trollbot9000 2009-07-01 10:03

truly a frightening situation to be in  your lisp jerk  circle arguing whether  gerry sussman or  why calculating is  better than scheming  1 1 Wadler  P A critique  of Abelson and  I start to  hum the SICP  video lectures Sussman  pronounces it as  an exe but.

Name: Anonymous 2011-01-31 21:18

<-- check em dubz

Name: Anonymous 2013-09-01 14:23


All the remaining propositions in this section assume the axiom of choice:

    If κ and μ are both finite and greater than 1, and ν is infinite, then κν = μν.

    If κ is infinite and μ is finite and non-zero, then κμ = κ.

Don't change these.
Name: Email:
Entire Thread Thread List