Page 1 of 1

user authentication before download

Posted: Sat Jan 20, 2007 7:08 am
by suhail_anwar_khan
hi friends,
please tel me how can i user can be authenticated by user name and password stored in MySQL database before he is allowed to download a file from a webserver, actually i want photos of diffrent users to be stored in diffrent places on web server and no one can download that photos using a direct url, each user should acces only his own photos and hense no download should be allowed without username and password auhentication of the downloader.

i would be greatful if you can provide me with useful links or sample code

thanks

Posted: Sat Jan 20, 2007 8:19 am
by feyd
Place the files outside of a web accessible location and/or place .htaccess files that prevent requesting the files (or possibly an interception.) Use a script to request them.

Posted: Sat Jan 20, 2007 8:22 am
by suhail_anwar_khan
can you please give me a link or a sample code script using which i can download the file

Posted: Sat Jan 20, 2007 8:24 am
by feyd
Sorry, I'm not here to search for you.

We have had threads about this subject area before.

Posted: Sat Jan 20, 2007 8:24 am
by Kieran Huggins
search for "image hotlinking" and you'll find a metric tonne of results - usually as easy as dropping a line in your .htaccess file

Posted: Sat Jan 20, 2007 8:25 am
by suhail_anwar_khan
thanks