By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,612 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,612 IT Pros & Developers. It's quick & easy.

poissble to automate access time?

P: n/a
Hello

Is it possibel to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...

Cheers

Geoff
Jul 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Tim
On Thu, 29 Jan 2004 09:24:06 GMT,
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote:
Is it possible to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...


Not normally. You'd need to come up with some non-standard solution
(such as some well thought out scripting on your server), as HTTP
doesn't have any way of logging off users. You really wouldn't have
some way of preventing users from logging back on again.

The usual way of tracking users is to play with cookies. e.g. You might
send one, keep checking on it as they peruse they site, then decide
after it's aged a certain amount to treat them differently.

Of course, this won't work if they won't accept the cookies, and
refusing to let people in because they refuse your cookies just means
that you're going to annoy people.

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #2

P: n/a
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote in
news:h0********************************@4ax.com:
Hello

Is it possibel to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...


Use server-side tools. For example, use PHP and sessions.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #3

P: n/a

"Tim" <Ti*@mail.localhost> wrote in message
news:uh********************************@4ax.com...
On Thu, 29 Jan 2004 09:24:06 GMT,
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote:
Is it possible to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...


Not normally. You'd need to come up with some non-standard solution
(such as some well thought out scripting on your server), as HTTP
doesn't have any way of logging off users. You really wouldn't have
some way of preventing users from logging back on again.

The usual way of tracking users is to play with cookies. e.g. You might
send one, keep checking on it as they peruse they site, then decide
after it's aged a certain amount to treat them differently.

Of course, this won't work if they won't accept the cookies, and
refusing to let people in because they refuse your cookies just means
that you're going to annoy people.


Some people are annoyed by *any* conditions of use of *anything* that
amounts to something other than permanent, free, and unlimited access.
That's just tough. do I understand that the difference here is not just a
matter of getting a user's agreement to a set of conditions, but of getting
him to change a setting in his browser that he likes having for good
reasons. Personally, I operate in "prompt me" mode in IE for persistent
cookies, which results in a lot of annoyance, but in the end I get to tell
DoubleClick to go to hell, while letting Amazon recognize me when I return
without having to look up my user name password again. And if I wanted to
try this person's site, and this was his condition of use, then if I was
sufficiently interested I'd click "Sure, go ahead, take it."

However, I think that any site that wants to leave a persistent cookie
should explain in advance why, and should let me know just what the
information is that they're storing (which I can then verify) and how they
plan to use it.

Jul 20 '05 #4

P: n/a
On Thu, 29 Jan 2004 12:43:38 GMT, Dave Patton <no**@none.com> wrote:
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote in
news:h0********************************@4ax.com :
Hello

Is it possibel to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...


Use server-side tools. For example, use PHP and sessions.


Dave

thanks for the reply - could you point me at any info on how to do
this?

Thanks again

Geoff
Jul 20 '05 #5

P: n/a
On Thu, 29 Jan 2004 10:54:40 -0500, "Harlan Messinger"
<h.*********@comcast.net> wrote:

"Tim" <Ti*@mail.localhost> wrote in message
news:uh********************************@4ax.com.. .
On Thu, 29 Jan 2004 09:24:06 GMT,
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote:
> Is it possible to automate the access time allowed to a folder? I am
> using .htpasswd etc and would like to give say 0.5 hour access to
> users so that they can sample documents available on the web site...


Not normally. You'd need to come up with some non-standard solution
(such as some well thought out scripting on your server), as HTTP
doesn't have any way of logging off users. You really wouldn't have
some way of preventing users from logging back on again.
Harlan

thanks for the info - looks like a no go !

Cheers

Geoff

The usual way of tracking users is to play with cookies. e.g. You might
send one, keep checking on it as they peruse they site, then decide
after it's aged a certain amount to treat them differently.

Of course, this won't work if they won't accept the cookies, and
refusing to let people in because they refuse your cookies just means
that you're going to annoy people.


Some people are annoyed by *any* conditions of use of *anything* that
amounts to something other than permanent, free, and unlimited access.
That's just tough. do I understand that the difference here is not just a
matter of getting a user's agreement to a set of conditions, but of getting
him to change a setting in his browser that he likes having for good
reasons. Personally, I operate in "prompt me" mode in IE for persistent
cookies, which results in a lot of annoyance, but in the end I get to tell
DoubleClick to go to hell, while letting Amazon recognize me when I return
without having to look up my user name password again. And if I wanted to
try this person's site, and this was his condition of use, then if I was
sufficiently interested I'd click "Sure, go ahead, take it."

However, I think that any site that wants to leave a persistent cookie
should explain in advance why, and should let me know just what the
information is that they're storing (which I can then verify) and how they
plan to use it.


Jul 20 '05 #6

P: n/a
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote in
news:hn********************************@4ax.com:
On Thu, 29 Jan 2004 12:43:38 GMT, Dave Patton <no**@none.com> wrote:
Geoff Cox <ge*******@dontspamblueyonder.co.uk> wrote in
news:h0********************************@4ax.co m:
Hello

Is it possibel to automate the access time allowed to a folder? I am
using .htpasswd etc and would like to give say 0.5 hour access to
users so that they can sample documents available on the web site...


Use server-side tools. For example, use PHP and sessions.


Dave

thanks for the reply - could you point me at any info on how to do
this?


Use PHP for all the webpages, and use PHP sessions to limit the
time. That alone won't stop a user from getting multiple 1/2 hour
'blocks of time', but it might be part of a solution.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #7

P: n/a
On Fri, 30 Jan 2004 18:02:03 GMT, Dave Patton <no**@none.com> wrote:

Use PHP for all the webpages, and use PHP sessions to limit the
time. That alone won't stop a user from getting multiple 1/2 hour
'blocks of time', but it might be part of a solution.


Dave

this is in place of .htpasswd etc? I thought that ,htpasswd might be
more secure than php for allocating access?

Cheers

Geoff

Jul 20 '05 #8

P: n/a
On Fri, 30 Jan 2004 18:02:03 +0000, Dave Patton wrote:
Use server-side tools. For example, use PHP and sessions.


Dave

thanks for the reply - could you point me at any info on how to do this?


Use PHP for all the webpages, and use PHP sessions to limit the time. That
alone won't stop a user from getting multiple 1/2 hour 'blocks of time',
but it might be part of a solution.

Sure it could..

Store a marker for the user of that day (database / flatfile). When they
next login:
if ((time() - $last_login_time) < 86400) {
die('Go away! time not up yet');
}

$_SESSION['login_time'] = time();
[...]
HTH =)

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 20 '05 #9

P: n/a
"Ian.H" <ia*@WINDOZEdigiserv.net> wrote in
news:pa****************************@hybris.digiser v.net:
On Fri, 30 Jan 2004 18:02:03 +0000, Dave Patton wrote:
Use server-side tools. For example, use PHP and sessions.

Dave

thanks for the reply - could you point me at any info on how to do
this?


Use PHP for all the webpages, and use PHP sessions to limit the time.
That alone won't stop a user from getting multiple 1/2 hour 'blocks
of time', but it might be part of a solution.

Sure it could..

Store a marker for the user of that day (database / flatfile). When
they next login:

if ((time() - $last_login_time) < 86400) {
die('Go away! time not up yet');
}

$_SESSION['login_time'] = time();
[...]


The reason I said "might be part of a solution" is that it
very much depends on your definition of "the user".
For example, is it based on a userid/password identification
scheme, or IP address(a flawed approach), etc.
Only with clear and complete specs for the business requirement
can an appropriate solution be designed(if at all).

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #10

P: n/a
On Fri, 30 Jan 2004 23:55:52 GMT, Dave Patton <no**@none.com> wrote:

The reason I said "might be part of a solution" is that it
very much depends on your definition of "the user".
For example, is it based on a userid/password identification
scheme, or IP address(a flawed approach), etc.
Only with clear and complete specs for the business requirement
can an appropriate solution be designed(if at all).


Dave

it is user id/password protection for the folder using .htaccess and
..htpasswd

Cheers

Geoff
Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.