Offering files from below the webroot

From: Date: Fri, 17 Oct 2003 03:12:52 +0000
Subject: Offering files from below the webroot
Groups: php.general 
Request: Send a blank email to php-general+get-166406@lists.php.net to get a copy of this message
Hi, this has been discussed before on the list but am unable to find it on http://marc.theaimsgroup.com/?l=php-general If anybody can point me to the correct URL or tell me how you did it I would really appreciate it. Problems simple: offer downloads from below the webroot, something like: somsite.co/getFile.php?user=a&pas=b&fil=a.something (a)check if $user with $pas of b is allowed to download a.something (because i dont know if its zip,pdf or what) if yes.... (b)open a file save dialog, give him the file I can do (a)...how to do (b)? I have checked up fpassthru and readfile...got confused and came here :-D, any pointers? I have also seen some places where the script gives the browser a gibberish url and opens up a save dialog box...this too would help eg: somsite.co/getFile.php?hshgkhsgk9asds223tgsa Thanks in advance. Cheers, -Ryan

« previous php.general (#166406) next »