Reply to Re: Securely serving files

Your name:

Reply:


Posted by Dra Jenic on 02/11/06 22:27

Yes actually I've done that before. It works just fine, as for cleaning
the files up afterward you could just use crontab. Assuming your using
Linux. Windows probably has something similar.
Nicholas Sherlock wrote:
> Hey all,
>
> People on my website register to be allowed access to certain downloads.
> I store these files above the document root so that they can't be
> accessed by Apache (Only from PHP). I wrote a file serving script which
> dumps the correct headers for the download and calls readfile().
>
> I thought everything was going swimmingly until I realized that my
> webhost has Safe Mode turned on, and the script execution time is
> limited to 30 seconds. If your file takes longer than that to download,
> then too bad :).
>
> So how can I do this? The files that I am serving are no larger than
> about 2 megabytes.
>
> It seems that one option would be to make a copy of the file I want to
> serve, but below the document root so that it is available from the
> browser. I'd give the file a randomly generated name that couldn't just
> be guessed, and just write a regular link to the browser. Has anyone
> tried this, and did it work out okay for you? How did you go about
> cleaning up files after the client has downloaded them? Is there a
> better option?
>
> Cheers,
> Nicholas Sherlock

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация