Jump to content
xisto Community
alex198555

Prevent Files From Being Downloaded?

Recommended Posts

Hey! I need some help. How can I create some script that allows my visitors to read the PDF files from my directory on my web-site or screen. I don't like the usual one. Because everyone can see the PDF file and then download it. I don't want this feature. Or even someone can use some special software and download it as well. I want that the information on my web-site was totally protected from downloading. In other words, my web-site will contain some copyright material. I would like to come with something that no one will download those materials.

Share this post


Link to post
Share on other sites

There's actually no way that I know of to prevent people from downloading a PDF because when your browser opens it for viewing it they can ether look at the source code or grab it from their cache. this has been mentioned in many threads stuff like this cannot be prevented from copying.

Share this post


Link to post
Share on other sites

I don't think there is no script, Though you can make a Power point or Word document using a PDF Creator Printer to convert it to PDF. Upload it to your FTP host & Make the domain redirect to dsdsds.pdf or something. Please let me know if you understand or need more help.

Share this post


Link to post
Share on other sites

Can't be done except by removing your site from the Internet, and that sort of defeats the purpose of having a site. You can protect the files by placing them above the public_html folder in your account so they are not web-accessible, but then people can't find them. Once you 'serve' them the file, their computer (or cache) has a copy. Nothing you can change about that. It is how the http protocol works.

Share this post


Link to post
Share on other sites

But I guess you can create a script with an username and a password when you want to download the file, without the right password you won't be able to download it.

Share this post


Link to post
Share on other sites

Why not make it a membership area. Make the area password protected and only allow downloads to registered users. I mean there are many such sites which offer similar features. You can try those membership site scripts and restrict people to download only if they are registered. I can think of only this way. Let's see if i can find any other alternative.

Share this post


Link to post
Share on other sites

Why not make it a membership area. Make the area password protected and only allow downloads to registered users. I mean there are many such sites which offer similar features. You can try those membership site scripts and restrict people to download only if they are registered. I can think of only this way. Let's see if i can find any other alternative.

I would go with this method. It's probably the best bet because of how PDF's work. It will won't change the fact that people can just upload the file all over the internet so others can get it for free....

Share this post


Link to post
Share on other sites

Use modules for the language of choice that can read PDF files, then have the script serve the content of the PDF to a Flash movie or something. I doubt they'd be able to take the content from the SWF file (which would only be one chapter or a few sentences). PHP has modules that can read and create PDF files. Look at the PHP manual for them. And if what is in the PDF file really important, then just give them the option to purchase the PDF. In the end, unless the Flash browser plug-in prevents itself being captured in screenshots, there is no way to prevent the content from being saved on the person's computer.

Share this post


Link to post
Share on other sites

You can try adding headers to force the computer into thinking that the pdf file is something else.


***Save it as A *PDF FILE*<?phpheader("Content-type:text/html");// The PDF source is in original.pdfreadfile("original.pdf");?>

This code MUST be out at the top of the page. And it must be saved as a .pdf file. If you have access to httpd.conf, change the settings to allow pdfs to be read as text.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.