Php Authentication

javajenius

New Member
Messages
258
Reaction score
0
Points
0
Could someone tell me how to protect a site using php and md5 authentication. I've looked through alot of google pages but i am truly confused. Please explain or give me a link that explains php authentication with md5 (or the most secure way to secure a site with php)
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
Do you mean HTTP authentication?

If so, this link should answer your questions:

http://www.php.net/features.http-auth

If not, or if that link doesn't help, could you explain more on exactly what it is you want your site to do to authenticate a user? Are you talking about a user registration/login system?

And as for md5, I personally prefer hash('sha256', $str) to it. But to each his own.
 

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
If you'd like to password protect a folder, this can be done through cPanel. Login as you usually would and somewhere is an option called Leech Protect. Once you've found it it's pretty self explanatory.

If you'd prefer to use a custom script to do it,this might help.
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
It sounds like you don't exactly know what you want to do.

I suggest that you install a forum or content management system using 'fantasico' from cpanel, and see if any of those systems are what you are looking for.
 

tittat

Active Member
Messages
2,478
Reaction score
1
Points
38
Try moving to a CMS(content management system).Iam using e107.Almost every CMS have its own inbuilt authentication system,which will helps you from the hassles of creating your own.
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
What exactly do you mean by "secure folders"? Furthermore, what exactly is it that you plan to store in the folders? It sounds to me that you're looking in the wrong place for what you want. PHP is just a scripting language, not a server.
 

konekt

New Member
Messages
100
Reaction score
0
Points
0
md5($var);
crypt($var, CRYPT_MD5);

...am I missing something?
 
Last edited:

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
normally you'd just store the password encrypted like $enc_pass = sha1($pass), in order to recognize that a person has entered the correct password you could just have it test the password the user supplies with the encryptions on it to see if it matches the encrypted one stored in a db or file.

you could always make your own hash... if you felt the need for it.
 
Last edited:

konekt

New Member
Messages
100
Reaction score
0
Points
0
normally you'd just store the password encrypted like $enc_pass = sha1($pass), in order to recognize that a person has entered the correct password you could just have it test the password the user supplies with the encryptions on it to see if it matches the encrypted one stored in a db or file.

you could always make your own hash... if you felt the need for it.

I always do multiple encryptions using varied encryption methods (mainly md5 and blowfish). I find using encryptions as hashes for further encryption is really effective... I usually do about 5-8 encryptions, with each encryption lending to the hash of the other. Yes... I am quite paranoid :happysad:
 

radofeya

New Member
Messages
49
Reaction score
0
Points
0
As I know, if u do multilevel encryption will make the possibility of collisions become higher. Such as $hash = sha1(md('hello'));

I'm I right?
 

tittat

Active Member
Messages
2,478
Reaction score
1
Points
38
Hmmm this thread is of more than six months old and i don't find any good reason to bump this thread back.
 
Top