Search the web
Sign In
New User? Sign Up
BbshopWebGuild · Barbershop Webmasters Guild
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Secure PDF Files   Message List  
Reply | Forward Message #541 of 912 |
Secure PDF Files

Our site runs on a UNIX server so all my applications are written in PHP.
 
The basic "trick" I use to protect our PDF files is to put them in a location that cannot be accessed via http.
Then I have the php program read the .pdf file from that location -- after the user has been identified via userid/password.
 
If the user is OK, then I read the .pdf file for the user and send it to him using the php readfile statement.
 
I've done the same thing using .ASP /vbscript using a custom binary read .dll and the vbscript binary write command.
 
So, instead of linking directly to the .PDF file, you link to a program that verifies the user's credentials and then spits back the .PDF file if userid/password is OK.
I've included the PHP source code from my site.
 
Mike Saeger
Secretary, Northbrook
 
 
<?PHP
if ($ViewPDF == "Click To View Newtra Notes") {
$pathtofile="/home/secretlocation/";
$filename="newtranotes.pdf";
header("Content-Type: application/pdf");
readfile($pathtofile."/".$filename);
}else{
$cfgProgDir = 'phpSecurePages/';
include($cfgProgDir . "secure.php");
?>
<html>
 <script LANGUAGE="JavaScript">
<!--
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
// -->
</script>
<form name=pdf action="newtranotes_pdf.php" method=post>
<table width="100%">
<TR>
 <TD ALIGN=CENTER>
<input type=submit name=ViewPDF value="Click To View Secret PDF File"></TD></TR></TABLE>
<?
}
?>
----- Original Message -----
Sent: Saturday, November 29, 2003 3:56 PM
Subject: [BbshopWebGuild] Secure PDF Files

I have successfully implemented Scott Hoge's password protected members
only page access.  Now I need to know how to protect Adobe PDF files so
they can only be read by members that have signed in with a password.  I
can, of course, limit access to the links to the PDF files, but the PDF
files themselves are stored in accessible locations.  I don't create the
PDF files myself, so I don't know if there is a way to switch this on in
the Adobe converter.  Any suggestions?

Phil Richards
Westchester Chordsmen




To unsubscribe from this group, send an email to:
bbshopwebguild-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Sun Nov 30, 2003 5:19 am

devmrs
Offline Offline
Send Email Send Email

Forward
Message #541 of 912 |
Expand Messages Author Sort by Date

I have successfully implemented Scott Hoge's password protected members only page access. Now I need to know how to protect Adobe PDF files so they can only...
Phil Richards
pcr06897
Offline Send Email
Nov 29, 2003
9:56 pm

Phil, If password protection can get you to a specific page, THAT PAGE can have an anchor to a pdf file: <a href="callingtree.pdf">Calling Tree</a>. The only...
Gary Efron
eprom
Offline Send Email
Nov 29, 2003
11:14 pm

One thing we do here -- just a variant -- for a major Pharmaceutical is simply create a system that requires a login to start and also tracks which files a...
David M. Dantowitz
david@...
Send Email
Nov 30, 2003
2:01 am

Our site runs on a UNIX server so all my applications are written in PHP. The basic "trick" I use to protect our PDF files is to put them in a location that...
Mike Saeger
devmrs
Offline Send Email
Nov 30, 2003
5:19 am

I do this all the time using Cold Fusion on Windows. It is probably the most secure way of of storing and distributing the files. The only thing more secure...
Daniel Garcia
padrino_yh
Offline Send Email
Nov 30, 2003
5:50 am

Also, you don't need to place the file in a folder above the root. It CAN be accessible via HTTP, but in a folder name that is unknown (consider using a...
David M. Dantowitz
david@...
Send Email
Nov 30, 2003
2:02 pm

.PDF files do have a password protection system, and yes, if you have full Acrobat (any version at least equal to that which the .PDF file itself is), and you...
Joel Ellis Rea
comalite_j
Offline Send Email
Nov 30, 2003
7:29 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help