zhq Posted October 3, 2006 Share Posted October 3, 2006 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 https://forums.phpfreaks.com/topic/22841-block-downloading-files-to-local-temp-directory-while-viewing-files-online/ Share on other sites More sharing options...
ToonMariner Posted October 3, 2006 Share Posted October 3, 2006 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 https://forums.phpfreaks.com/topic/22841-block-downloading-files-to-local-temp-directory-while-viewing-files-online/#findComment-102931 Share on other sites More sharing options...
AndyB Posted October 3, 2006 Share Posted October 3, 2006 No caching with IEhttp://support.microsoft.com/kb/234067/Caching in generalhttp://www.web-caching.com/mnot_tutorial/how.html Link to comment https://forums.phpfreaks.com/topic/22841-block-downloading-files-to-local-temp-directory-while-viewing-files-online/#findComment-102933 Share on other sites More sharing options...
zhq Posted October 6, 2006 Author Share Posted October 6, 2006 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 https://forums.phpfreaks.com/topic/22841-block-downloading-files-to-local-temp-directory-while-viewing-files-online/#findComment-104786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.