Page 1 of 1

Php save

Posted: Wed Feb 14, 2007 7:59 am
by user___
Hi guys,
I am creating a portal which is used by users to upload and download different files. I want when a user upload for example .php file and another user tries to download it a download message to be displayed as if they were downloading an .exe file. I know that this can be accomplished while the upload is being done but I need it to start when a download has been initiated. I would appreciate any kind of help witha nother problemn. I want to enable users to download a page they are browsing without file->save/save as procedure. I have tried a JavaScript but it works only with IE.

Posted: Wed Feb 14, 2007 8:33 am
by feyd
Search for force download. We've talked about it a whole lot.

Reply

Posted: Wed Feb 14, 2007 9:10 am
by user___
Thank you, feyd. I found enough information about how to force a download but I did not find anything about saving page while browsing.

Posted: Wed Feb 14, 2007 9:34 am
by feyd
You can't do both at once without control over where php is saving the files. Provide a link or something that requests the page again, but triggered to force the download.

Reply

Posted: Wed Feb 14, 2007 9:51 am
by user___
I do not mean saving simulaniously. I will try to explain clearer. A user clicks on a button and then a window pops up and ask them to save the page but I do not mean only the source but all, images, flashes, and csses. The same as if you want to save a page from File->Save/Save As.

Posted: Wed Feb 14, 2007 12:22 pm
by feyd
PHP cannot make the browser save all the files. PHP can zip the files, but there's no way to control the browser's own saving mechanisms.

Reply

Posted: Wed Feb 14, 2007 1:02 pm
by user___
I though it was the case but now I am sure.