Re: authentication problems!
| From: | Scott Taylor | Date: | Wed, 21 Jan 2004 17:05:54 +0000 |
| Subject: | Re: authentication problems! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175315@lists.php.net to get a copy of this message | ||
Do you mean using
$file = '/protected/file.pdf';
or using an absolute path on the server?
Best Regards,
Scott
Subject:
Re: [PHP] authentication problems!
From:
"Luke" <webmaster@build3d.com.au>
Date:
Wed, 21 Jan 2004 14:24:11 +1100
To:
php-general@lists.php.net
Yeah, i think i mentioned the same thing(or was going to :/ )
you should be able to use the local filesystem, and reffer to it relatively!
and then you can stream it and you wont need any authentication, and noone
will be able to directly link to the file
-- Luke "Jason Wong" <php-general@gremlins.biz> wrote in message news:200401210620.25503.php-general@gremlins.biz...
On Wednesday 21 January 2004 05:49, Scott Taylor wrote: Please trim your posts!Of course there is not problem if the user is entering the information him or her self. But just using this code:$file = 'http://miningstocks.com/protected/Dec03PostPress.pdf';//now view the PDF file header("Content-Type: application/pdf"); header("Accept-Ranges: bytes"); header("Content-Length: ".filesize($file)); readfile($file);from a PHP page where no authentication has occured does not work atall.
Did you not read my reply to your previous thread about this? Use a local filesystem path to read the file. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "A dirty mind is a joy forever." -- Randy Kunkee */