hi
im trying to make a php download script, but im not sure how i would go about stopping the browser downloading the file unless it has gone through the script. ill use .htaccess on the folder with the files, but how do i make php allow the user to download?
hope someone can help
Tom
php download script
Moderator: General Moderators
- d-m
- Forum Commoner
- Posts: 31
- Joined: Fri Aug 29, 2003 4:24 pm
- Location: Rio de Janeiro - RJ - Brasil
Re: php download script
If you make apache the autenticator using .htaccess ... The user only enters at these area if he is alowded . (Alowded to download the file I mean)toms100 wrote:hi
im trying to make a php download script, but im not sure how i would go about stopping the browser downloading the file unless it has gone through the script. ill use .htaccess on the folder with the files, but how do i make php allow the user to download?
hope someone can help
Tom
So you just make a page with a href to the file ... and the user download the file .
Other users that do not autenticate 'll not be able to get it... Apache .htaccess 'll do the job for U.
Other way that you can do it in php is having a user name and pass at a database, autenticate the user .. if the user have a download status at the database you include an a href to the file at your php file.
I hope that I could help U.