Using PHP to send file through a http pipe?
| From: | Jack | Date: | Sun, 26 Dec 2004 10:20:12 +0000 |
| Subject: | Using PHP to send file through a http pipe? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-205180@lists.php.net to get a copy of this message | ||
I was wondering if I could get some help on a minor problem I have.
Here's the deal I have set up on my system.
http://ftp.brajah.com/
I created this simple little interface to list files and directories in the
public ftp folder. The only problem is, I had to move the whole directory to
my web site just to allow people to download the file. (ie:
(site)/ftp/atcommand.txt )
What I want to do is have a file (like get.php) which will read the file on
the drive, and then transfer it through to the client on the browser. (ie:
get.php?file=/atcommand.txt )
Is there a simple way to do this while reducing security concerns? (Ie:
reading ../../../../../etc/passwd )
--Jack