Reply to Re: [PHP] is it possible.

Your name:

Reply:


Posted by Gorm on 07/30/05 00:13

You could copy the file to a temp-file "file_id.zip" and delete it after
download. But perhaps it is possible to just have the file in cache ?

jenny mathew wrote:
> i used following code for downloading file.whenever the members cicked the
> file for downloading ,the download request (with the variable containing
> file id) was send to download.php .The download.php on recieving the file id
> fetches the url of the fileand redirects to the file url using
> Header("location:$url");
> where $url is the full url of file such as
> http://www.abc.com/downloads/file1.zip.
> so finally the url is exposed to the members who circulates the url in mails
> and everybody downloads the files.I want that only members can download the
> file.is <http://file.is> there any solution.
>
> On 7/29/05, André Medeiros <andre.caum@gmail.com> wrote:
>
>>When deppending on authentication, never link the files directly.
>>
>>You can create a download.php file that gets an ID through the URL,
>>checks if the user is authenticated and then read the file.
>>
>>You will need these functions:
>>
>>http://pt.php.net/file_get_contents
>>http://pt.php.net/header
>>
>>Header() is to send the mime type, and file_get_contents is to read the
>>file's contents (DOH).
>>
>>If you run into trouble, you can (in the order given ;):
>>
>>1) Read the user's comments on both functions. They're pretty helpful
>>sometimes
>>2) Mail the ML :)
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>

[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

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