> then, can .htaccess store the user expried date ?
> like Peter is not allowed to login after 2Feb 2001, Sam is expired after
> 11Nov 2002......

Yes and no. You just have to make a change in the .htaccess file.

> and also, is it possible to maintain the .htaccess automatically ?
> like I write a shell script and run it schedully to delete those expired
> entry ?

Yes it a possibility. Think you can make it with a simply fopen() fwrite(), 
with the cron daemon.

The other possibility is to make a folder outside webscope.
Then you can make a loginscript in mysql like:

$connection = mysql_connect("host", "user", "pwd");
$query = "SELECT id FROM users WHERE user = '$user' AND pwd = '$pwd'":
$result = mysql_query($query);
if(mysql_num_rows($result) > 0) {
    header("Content-type: you choose");
    header("Content-length: filesize('/home/filename')");
    header("Content-Disposotion: inline; filename=filename.tar.gz");
else {
   echo "you are not allowed to download this file!":

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to