php and pdf 
Author Message
 php and pdf

does anybody know of a secure way to prevent unauthorized pdf file
downloads?

the problem with pdf files is that even if a user is required to login to
download or view them if they know the path to the file they can still use
this url to bypass any login code.

maybe a php script that is working for you or best of all a tutorial?

thanks

Al



Fri, 26 Aug 2005 19:45:17 GMT  
 php and pdf
the simplest way would be to make a php script which checks if the user is
authorized - and then (if he is authorized) read the pdf file and echo it
to the browser with the apropriate headers.

mfG
Wolfi

Am Mon, 10 Mar 2003 11:45:17 +0000 schrieb superdude:

Quote:
> does anybody know of a secure way to prevent unauthorized pdf file
> downloads?

> the problem with pdf files is that even if a user is required to login to
> download or view them if they know the path to the file they can still use
> this url to bypass any login code.

> maybe a php script that is working for you or best of all a tutorial?

> thanks

> Al



Fri, 26 Aug 2005 21:52:45 GMT  
 php and pdf

Quote:

> does anybody know of a secure way to prevent unauthorized pdf file
> downloads?

> the problem with pdf files is that even if a user is required to login to
> download or view them if they know the path to the file they can still use
> this url to bypass any login code.

> maybe a php script that is working for you or best of all a tutorial?

> thanks

> Al

Put a password on the file, then only give the password to those who are
logged in. Not fool-proof, but definately discouraging ;)

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Fri, 26 Aug 2005 21:54:58 GMT  
 php and pdf

Quote:

> does anybody know of a secure way to prevent unauthorized pdf file
> downloads?

> the problem with pdf files is that even if a user is required to login to
> download or view them if they know the path to the file they can still use
> this url to bypass any login code.

Don't put the pdf file in space that the web server can address.

Then in your php script....

<?php # check for authentication

       $file = fopen($filename,'r');

       header('Content-type: application/pdf');
       fpassthru($file);
?>



Fri, 26 Aug 2005 22:13:28 GMT  
 php and pdf
I have done this before.
Couldn't find any good help, so once I got it going I wrote a basic tutorial
on it with a working example.

http://www.wazzup.co.nz/tutorials/protect_pdf/

YoBro


Quote:
> does anybody know of a secure way to prevent unauthorized pdf file
> downloads?

> the problem with pdf files is that even if a user is required to login to
> download or view them if they know the path to the file they can still use
> this url to bypass any login code.

> maybe a php script that is working for you or best of all a tutorial?

> thanks

> Al



Tue, 30 Aug 2005 12:37:13 GMT  
 php and pdf
excellent, will have a look


Quote:
> I have done this before.
> Couldn't find any good help, so once I got it going I wrote a basic
tutorial
> on it with a working example.

> http://www.wazzup.co.nz/tutorials/protect_pdf/

> YoBro



> > does anybody know of a secure way to prevent unauthorized pdf file
> > downloads?

> > the problem with pdf files is that even if a user is required to login
to
> > download or view them if they know the path to the file they can still
use
> > this url to bypass any login code.

> > maybe a php script that is working for you or best of all a tutorial?

> > thanks

> > Al



Tue, 30 Aug 2005 15:56:23 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. PHP and PDF examples/How to

2. PHP and PDF

3. Using PHP to fill data on a PDF

4. PHP, PDF, and FDF - problem with PHP4 default Content-Type: text/html

5. searching in word document (or exell or pdf etc) with a php script

6. Recherche de fichiers PDF en PHP

7. Search some String in PDF with PDF.OCX

8. Appendix.pdf - Appendix.pdf (0/6)

9. extract info from pdf doc,PDF to XML, HTML

10. CL-PDF the Common Lisp PDF Library 0.2

11. CL-PDF: need beta testers for cl-pdf 1.0

12. CL-PDF 0.45 (The Common Lisp PDF Library)

 

 
Powered by phpBB® Forum Software