Reply to Re: [PHP] Hidden File Downloads

Your name:

Reply:


Posted by Pascal Polleunus on 09/28/88 11:14

Stuart Nielson wrote:
> I am trying to setup a script that allows people to upload files for
> specific, permissions-based, projects.
>
> i.e. There are logs that are viewable to clients only after login. The
> admin also has the ability to upload files. These files should be
> associated with a particular log, and then should show up at the bottom
> of the log as a link. Because it's permissions-based, however, the file
> should not be a standard ftp/http link pointing to the file, but should
> rather be a script that grabs the file, and sends it to the user.
>
> A good example of this is Adobe. When downloading tryout software from
> their site, there is something like this:
>
> http://www.adobe.com/products/tryadobe/thankyou.jsp?
> ftpID=2391&fileID=2270
>
> Does anybody know how to do this with php? I'm not sure how to find the
> file in the backend and kick it back to the user with the "Save As" box
> popping up. I'm thinking maybe it has something to do with headers, but
> I'm not sure. Thanks.
>
> Stuart

Hi Stuart,

You should use the function "fpassthru".
You'll need to play with the headers, check the user contributed notes
on http://www.php.net/manual/en/function.fpassthru.php

Cheers,
Pascal

[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

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