|
|
|
|
![]() ![]() |
May 23 2005, 01:57 PM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 11 Joined: 22-May 05 Member No.: 5,340 |
Hi,
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. Thanks in advance, -!DraXxuS!- |
|
|
|
Aug 23 2005, 02:15 PM
Post
#2
|
|
|
Member [ Level 2 ] Group: Members Posts: 56 Joined: 17-August 05 Member No.: 7,907 |
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.
|
|
|
|
Oct 18 2005, 01:09 PM
Post
#3
|
|
|
Newbie [ Level 1 ] Group: Banned Posts: 5 Joined: 17-October 05 Member No.: 9,161 |
Difficult to solve your problem, I think!
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 |
|
|
|
Oct 26 2005, 09:03 PM
Post
#4
|
|
|
Wheeeeeeee! Group: Members Posts: 245 Joined: 19-October 05 From: DG, Belgium Member No.: 9,200 |
Hello there,
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 |
|
|
|
Oct 27 2005, 07:55 AM
Post
#5
|
|
|
Pretty please? Group: Members Posts: 733 Joined: 28-November 04 From: Holland Member No.: 1,552 |
Notice from jipman:
Topic started at 23 may, and still no reply from the topic starter. I think it's justified to close this one down. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 5th September 2008 - 12:48 PM |