Feed it through a PHP page.

Something like:

<?php
        if ($_SESSION['Auth'] === true) {
                // set headers?
                fread('/not/web/accessible/dir/file.pdf');
        } else {
                echo 'Denied, foo.';
        }
?>

Nicholas Hart wrote:

Hi,

Anyone know a simple way to read-protect a file/library via a php login? I have a login page which starts a session but there are certain dynamically created result files which I need to protect from potential prying eyes.

For example, you can connect to https://www.mptf.org:75/docs/TF2.pdf but I want to find a way to test your login status before permitting you to view this file. Let me know what you think. Thanks!

Regards,
Nicholas Hart




_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php



--

Thanks!
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
begin:vcard
fn:Brian Dailey
n:Dailey;Brian
org:;Department of Geekery
adr;dom:;;;New York;NY
email;internet:[EMAIL PROTECTED]
title:Senior Software Engineer
tel;home:423 506 0349
x-mozilla-html:FALSE
url:http://dailytechnology.net
version:2.1
end:vcard

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to