/    Sign up×
Community /Pin to ProfileBookmark

dynamically adding users to protected directory

hi,

i am relatively new to running a ‘members only’ type site. We essencally have placed content in a password protected directory.

at this point we are faced with a dilema. How do i dynamically add some one to the list of people allowed to access the protected directory.

what we do is present a page that asks for a subscription donation on sucessfully making the payment we would like to automatically add the persons name and password to the access file.

is there some script to do this?

also.. is there a way to have more then one ‘password’ protected directory or different levels of access. (Ie:junior, regular, premium members).

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Feb 17.2007 — If it's an Apache server then you can use a program called htpasswd to update the password file.
Copy linkTweet thisAlerts:
@pastorharryauthorFeb 17.2007 — how do i call the program dynamically. i mean if i could some how get the user name into a varable, and their password in anoghther how do i call the htaccess (function/program) from within a web. i thought perhaps php had such a function built in. it would seem such a typical thing one would want to do.
Copy linkTweet thisAlerts:
@ray326Feb 18.2007 — Here's a Perl module that could be called through CGI to do the job.

http://search.cpan.org/~mono/PWD-PwBasic-0.13/PwBasic.pm
×

Success!

Help @pastorharry spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...