Jump to content

block downloading files to local temp directory while viewing files online


zhq

Recommended Posts

Dear All,

The database I used is MySQL. I am trying to block user from downloading files to local temp directory while viewing a confidential document online. I don't know how to do it.  Any help will be much appreciated. Thanks a lot in advance.

zhq
Link to comment
Share on other sites

NOt bang up on this but if you use this header...

header('Cache-Control: no-cache');

that will prevent the browser automatically cahcing the file - then you will need some magic to prevent the user saving the file - javascipt unfortunately so they could disable it. In that case use javascript to construct the page - that way they need it on to see it so you can then control them saving...
Link to comment
Share on other sites

Dear All,

Sorry I am not quite clear about this becasue I am new to all the topic. Using "header('Cache-Control: no-cache')", the downloading to the temp directory can be blockbed. For blocking user to use the 'save as' function to save a PDF file, the java script has to be used. Am I right? Instead of using Java script, can PHP script work for this?

I need a clear drection so that I know how to start my work. Thanks.

zhq
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.