|
|
 |
|
 |
|
x10 Sophmore
Join Date: Jan 2008
Posts: 236
Credits:
249
|
|
03-23-2008, 11:14 PM
|
|
Php Authentication
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)
|
|
|
|
x10 Lieutenant
Join Date: Mar 2008
Posts: 359
Credits:
4,059
|
|
03-24-2008, 12:54 AM
|
|
Re: Php Authentication
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.
__________________
"But you have access to the greatest source of knowledge in the universe."
"Well I do talk to myself sometimes, yes."
|
|
|
|
// Account Manager //
Join Date: Nov 2007
Posts: 3,215
Credits:
13,708
Location: #offtopic ;)
|
|
03-24-2008, 05:35 AM
|
|
Re: Php Authentication
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.
|
|
|
|
Lord Of The Keys
Join Date: Jan 2008
Posts: 1,368
Credits:
9,224
Location: Australia
|
|
03-24-2008, 06:30 AM
|
|
Re: Php Authentication
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.
|
|
|
|
Subeesh R, X10 Senior Moderator
Join Date: Sep 2007
Posts: 1,721
Credits:
675
Location: Kerala,India
|
|
03-24-2008, 07:17 AM
|
|
Re: Php Authentication
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.
__________________
If you find my post helpfull pls give me the reputation.
non ref id: co.cc
|
|
|
|
x10 Sophmore
Join Date: Jan 2008
Posts: 236
Credits:
249
|
|
03-25-2008, 01:05 AM
|
|
Re: Php Authentication
Quote:
|
Do you mean HTTP authentication?
|
No, thats insecure.
Quote:
|
If you'd like to password protect a folder
|
Still http basic auth.
Quote:
|
forum or content management system
|
I need to build my own for the control panel =(.
Is no one good enough at php to help me secure some folders...
|
|
|
|
x10 Lieutenant
Join Date: Mar 2008
Posts: 359
Credits:
4,059
|
|
03-25-2008, 02:36 AM
|
|
Re: Php Authentication
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.
__________________
"But you have access to the greatest source of knowledge in the universe."
"Well I do talk to myself sometimes, yes."
|
|
|
|
x10 Sophmore
Join Date: Mar 2008
Posts: 100
Credits:
2,696
|
|
03-25-2008, 05:52 AM
|
|
Re: Php Authentication
md5($var);
crypt($var, CRYPT_MD5);
...am I missing something?
Last edited by konekt; 03-25-2008 at 05:53 AM.
|
|
|
|
Developer
Join Date: Apr 2005
Posts: 1,692
Credits:
11,475
Location: Minnesota
|
|
03-25-2008, 06:04 PM
|
|
Re: Php Authentication
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 by Jake; 03-25-2008 at 06:07 PM.
|
|
|
|
x10 Sophmore
Join Date: Mar 2008
Posts: 100
Credits:
2,696
|
|
03-25-2008, 06:41 PM
|
|
Re: Php Authentication
Quote:
Originally Posted by Jake
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 
|
|
|
|
 |
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:12 PM.
Powered by vBulletin® Version 3.7.3 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
The eBay Song | Mortgage Calculator | Car Finance | Books | Project cars for sale
| |