[PHP] how to block a user downloading a file?

2003-08-28 Thread fatih olcer
hi,
how to block a user downloading a file?
eg : when  a user enter an address like 
  http://localhost/downloads/testfile.cab
i want to forward him to an other address like
 http://localhost

i'm PHP newbie thanks for help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to block a user downloading a file?

2003-08-28 Thread Tassos T
fatih olcer wrote:

hi,
how to block a user downloading a file?
eg : when  a user enter an address like 
 http://localhost/downloads/testfile.cab
i want to forward him to an other address like
http://localhost

i'm PHP newbie thanks for help.

 

hi,
 you have to use this code :
?
header (Location:  http://localhost;);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] how to block a user downloading a file?

2003-08-28 Thread [EMAIL PROTECTED]
Hello,

Since this is a cab file, i don't think you will be able to modify it. 
Why don't you put the cabs outside the document root? there was a 
discussion on doing something similar just this week on this very list.

If you insist on having the stuff on the document root you can use 
.htaccess files with the appropriate allow / deny directives. but i have 
a hunch you may be on windows :-)

best regards
raditha


Tassos T wrote:

fatih olcer wrote:

hi,
how to block a user downloading a file?
eg : when  a user enter an address like  
http://localhost/downloads/testfile.cab
i want to forward him to an other address like
http://localhost

i'm PHP newbie thanks for help.

 

hi,
 you have to use this code :
?
header (Location:  http://localhost;);
?


--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php