I use .htaccess to protect the members area of my site. I use a script called register.pl (search hotscripts and you'll see it) This script takes the username and password provided by the user and then enters the username and the encrypted password into the password file.
What I want to do is, along with the username and password being taken, I want to also take the email address and when the user forgets his/her password all he has to do is type in the email, and the password will be sent.
Found this site on the web. I use one very similar too it think you find it is what you need. http://www.custom-cgi.com/free/cookie_login/ I just started to experiment with it so I can tell you much about it.
Perhaps it's easier if you work with mySQL, the name and password are put in the password-file and in the same script, the name, passwort and entered e-mail are saved in your database!
If anyone lost his password, you can easier use your database to (re)send the password than the htacces-password-file!!
Aditionally, i don't think that youre able to put anything else except the name und encryptet password in htaccess-pwd-file!!
Correct me, if I should be wrong...
__________________
Sorry for my probably bad english, but I'm from germany
I think it should be possible. You are trying to make up some connection between names and email addresses, right? Well, you can do this by corresponding line: for example
CODE
line 7:htpasswd -bc .htusers Toni one line 8:htpasswd -bc .htusers Luigi two line 9:htpasswd -bc .htusers Bernardo three lline 10:htpasswd -bc .htusers Hernandez four
So if you just read in the .htusers file into an array like the PHP function "file()" You got them grouped by lines. So Mr. Luigi would be Nr. 8. If you now have a database with the emails in it or a textfile (would not recommend that), than you can just give the corresponding line numbers to the email address. So, if Mr. Luigi now tries to get his password send, you take his line number and email address from the database, open the .htusers file with file().. Wait it's easier in code
CODE
$userfile= file(".htusers"); $theline = explode(" ",$userfile[$x=8]); // there are always three spaces (" ") in a line $user = $theline[2]; // the user name $password = $theline[3]; // the users password // email address you got from database. now you can send an email with this data, hope you know how that works. php.net/mail
Should do the job, but you will have to change it for your personal circumstances! Good luck!
regards, Ruben
Oops, I assumed PHP! Sorry for the double post. I do not know perl at all, but I hope the Idea is clear! Sorry for the double post, may be a mod could edit? Thanks! Ruben
I want to know the perl path to include at the beginning of the file....so that my perl scripts will
run properly... Or is it ok to make a cgi-bin directory and put my perl scripts in it? Any reply is
appreciated. cpn....
If You Looking CGI Script or you want share information about it please comment here /cool.gif"
style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> Stop using those horrible
colors, fonts and font-sizes. ....
Have a format in mind and have a good idea how it works. So here what I need: step 1::: person must
register: create handle // enter password // enter password // enter email : it then takes the
person to acsepted page or reject per reason page. step 2::: login page: enter handle // enter
password : takes them on it to the site of their control pages for each handle controls their own
pages yet all pages interacts with the others. or bad password re login page. Have the page
designed already have the script in html lang but one can create a password on the html page but....
I want to create a simple html form which submits the information to a processor which in turn
checks the login and either lets them access the members area or takes them to the login failed
page. I tried a script which take the username and password and then puts it in the format
http://username:password@mydomain.com/protected/ bu the problem with that script is that if the
password is wrong then the login box pops up and this doesnt close even after hitting the cancel
button about 4-5 times. Is there any better way to secure a members area (an entire folder) withou....
Okay, I was trying to write a chat script for perl with tk for the GUI on active perl 5.8. But
whenever I use the $socket->listen() function to connect to the client, the script always hangs on
me. Any ideas as to how to avoid this problem (I've tried numerous codes including the one from
webmonkey).....
Here's my code: CODE #!/usr/bin/perl # print "Content-type: text/html\n\n"; print "Howdy,
world!"; I saved it in my cgi-bin with 777 permissions and It goes; QUOTE Internal Server
Error The server encountered an internal error or misconfiguration and was unable to complete your
request. Please contact the server administrator, webmaster@supper.astahost.com and inform them of
the time the error occurred, and anything you might have done that may have caused the error. More
information about this error may be available in the server error log. Addition....
Hey everyone, got a problem with a Perl script I'm trying out. In my Perl script, I have the
user input a number to dynamically display a number of text form fields in which they enter figures.
At the bottom, there will be a button to give the sum of all the numbers in the text
fields--that's where I'm stuck, I got the text boxes to show up alright, but that's
about it. I thought I might use JavaScript, but that didn't turn out to well. I was thinking of
using arrays for the name referencing in the javascript part, but I couldn't figure that out e....
If you'd like to protect you doc without the standard program and algorithms you'll fide it
useful, Now the only big problem is the ARRAY pased to the subs, in fact I can't pass 2 @ at
the same Sub so I have to use a global array(@plus) in the subroutines, SomeOne knows if is it
possibile to pass 2 @ to a sub? if yes how? CODE #!/usr/bin/perl #************Random Signature
V1,0******************# #* CodeName: Crypto v1.7 alpha *# #* Coder: K22 -
www.klakice.astahost.com; *# #* Date: 07/11/2004; ....
Looking for password, reminder, password, change, htaccess, script, change, password
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.