Page 1 of 1

Secure a PDF with PHP

Posted: Mon Jul 24, 2006 3:33 pm
by Assured99
Is there any way to add PHP code to a PDF???

I have a php script that restricts my members to certain areas.

I have some PDF documents that i want to incorporate into the links for users but i want to secure them with the same PHP code i use to secure the other pages.

Is this possible?

If not what alternitaves could i use to make this happen


Thanks

~Snapple

Posted: Mon Jul 24, 2006 3:46 pm
by feyd
make a download script that performs your security checks and directly sends them the file, not linking to it.

Posted: Mon Jul 24, 2006 3:47 pm
by Assured99
LOL can i ask how difficult this is cause i am pretty new to the whole PHP thing

Posted: Mon Jul 24, 2006 3:51 pm
by feyd
no more difficult than doing a few calls to header() and readfile().

Posted: Mon Jul 24, 2006 3:52 pm
by Assured99
what if i was to have the PDF open the secure script when opening the page?

Posted: Mon Jul 24, 2006 3:58 pm
by feyd
why not try it?

Posted: Mon Jul 24, 2006 4:17 pm
by Assured99
I did and its not that cool o well back to the drawing board