Re: Need Your Help :) I'm Just About Creating File Uploading Service

From: Date: Thu, 16 Apr 2009 21:13:43 +0000
Subject: Re: Need Your Help :) I'm Just About Creating File Uploading Service
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-291593@lists.php.net to get a copy of this message
Michael A. Peters wrote:
Nitsan Bin-Nun wrote:
Neh, we don't have plenty of these in Israel, don't count it in as an issue. Serving the files won't be an overkill for my harddrive / cpu usage / anything else? There is a better way to serve the files with/without PHP and keeping them outsite of the HTTP root?
If you want to use http the code I provided in my first response works very well for files I serve outside the web root. make a dummy directory in the web root. In that dummy directory put a single php file - called "dummy.php" or whatever. Have that file check the users credentials etc. (IE via session id) - and have $thispage=$_SERVER['REQUEST_URI']; put a .htaccess file in the dummy directory containing: RewriteEngine on RewriteRule ^*\.iso$ dummy.php
That assumes apache is your server, you have the mod_rewrite module, and allow .htaccess override (if you don't want to allow .htaccess overide you can put the rewrite directive right in the http.conf for the dummy directory)

« previous php.general (#291593) next »