Jump to content


Photo

block downloading files to local temp directory while viewing files online


  • Please log in to reply
3 replies to this topic

#1 zhq

zhq
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 03 October 2006 - 09:05 AM

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

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 03 October 2006 - 10:08 AM

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...
follow me on twitter @PHPsycho

#3 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 03 October 2006 - 10:10 AM

No caching with IE
http://support.micro....com/kb/234067/

Caching in general
http://www.web-cachi...torial/how.html
Legend has it that reading the manual never killed anyone.
My site

#4 zhq

zhq
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 06 October 2006 - 03:26 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users