Secure a PDF with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Assured99
Forum Commoner
Posts: 81
Joined: Wed Jul 12, 2006 11:48 am
Location: California

Secure a PDF with PHP

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

make a download script that performs your security checks and directly sends them the file, not linking to it.
User avatar
Assured99
Forum Commoner
Posts: 81
Joined: Wed Jul 12, 2006 11:48 am
Location: California

Post by Assured99 »

LOL can i ask how difficult this is cause i am pretty new to the whole PHP thing
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

no more difficult than doing a few calls to header() and readfile().
User avatar
Assured99
Forum Commoner
Posts: 81
Joined: Wed Jul 12, 2006 11:48 am
Location: California

Post by Assured99 »

what if i was to have the PDF open the secure script when opening the page?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why not try it?
User avatar
Assured99
Forum Commoner
Posts: 81
Joined: Wed Jul 12, 2006 11:48 am
Location: California

Post by Assured99 »

I did and its not that cool o well back to the drawing board
Post Reply