[thelist] Downloading a file without giving the link

Hassan Schroeder hassan at webtuitive.com
Wed Oct 2 15:05:01 CDT 2002

Kevin wrote:

> I am in the process of developing a perl script that will allow downloading
> a zip file only once. My problem is that if I give out the link, I will not
> have any control and people will be able to download the file many times.
> What is the best way to handle a situation like this? Can the binary data be
> send via a special header?

Sure, prepend an appropriate Content-type header ("application/zip"
in this case) and write the file to standard out. But you'll still
have to determine whether the user has submitted the request form
(or whatever) more than one time ...

Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

     -- creating dynamic Web sites and applications since 1994 --

More information about the thelist mailing list