See this article: http://www.zend.com/zend/trick/tricks-august-2001.php
It got me well on the way to understanding this. You will need to combine with some sort of user/session/login management script, but there are hundreds of articles on the web about this. Personally, I started with an article by Kevin Yank on sitepoint.com, but it's now pretty out of date (pre register globals off)... I doubt there's even one line of code left that is his... as my understanding grew, I built things the way I wanted. There are definitely a few articles to help you with this on zend.com as well, eg: http://www.zend.com/zend/tut/ Trust me, take a little bit of time to learn what's going on with session based authentication, then a little more understanding how to protect and download files, then blend them together. Not only will you have source code that you completely understand, you'll also have exactly what you want, with the power to extend it as you wish. Justin French --------------------------------- Indent.com.au --------------------------------- Graphic, Web & Information Design Web Application Development --------------------------------- e: mailto:[EMAIL PROTECTED] w: http://www.indent.com.au t: 03 9531 4304 (+61 3 9531 4304) m: 0414 243 462 (+61 414 243 462) --------------------------------- on 16/06/03 12:32 AM, Peter Berglund ([EMAIL PROTECTED]) wrote: > ok, I change my question, how do I protect downloadable files from users > that are not valid? > without the use of htaccess? > > "Peter Berglund" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] >> I want to send user and password from php to a protected directory. >> For example: If I go directly to the directory I get a popup to enter user >> and password, the normallt way. >> >> But if I go through a php-script that checks if I'm a valid user from a >> database I will get access to the folder. >> >> So i need a way to send user/password from php to the .htaccess file. >> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php