Is there a way to create a Username/password login and the information stored in a .txt file? Can you please share the code
yes, its pretty easy, but not very secure, i wouldnt recommend it. even encrypting the data or using a hash still isnt very safe.
it doesnt have to be rediculously safe. I just need it so clients can check the progress of the work.
You can store it in files with fopen, fwrite, fread and fclose. However an attacker just needs to know the address to that file and can gain access. So if anything you should put that file above the document root.
kLogin 0.1 downloadable here: www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=1658&lngWId=8
you can put the file outside the www directory, use crypt() php functions, also could use passwd format. what is securable - database or file putted this way - we could argue. Also you can use password protected directories and check for php authenticated username to detect, who was authenticated
what about this? (taken from http://www.zend.com/zend/tut/authentication.php) <?php if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW)) || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'open' ) ) { header( 'WWW-Authenticate: Basic realm="Private"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { echo 'Success!'; } ?> Code (markup): No more text file needed.. just have this on top of your script or have it included using the include function ( include "filename.php"; ). there are better approach to do this but this one seems to be the simplest.
It is never safe for you if store your username and password in "TEXT" file such as: .txt .inc .dat ... because hackers can search it and it will be hacked. If you use php you can insert this code into file you need protect, after first <?php: For above: 21232f297a57a5a743894a0e4a801fc3 --->admin 1a1dc91c907325c69271ddf0c944bc72 --->pass Meaning you can login with: User=admin | Password=pass You can make your own username and password encrypted: http://gdataonline.com/makehash.php and input your username & password and submit. Replace it! It is very security
ya, like i said, you could use a hash, but you can still decrypt them with a script if you get the text file, but its better then just plain text. ...thats assuming you are still usinga text file, if you are just storing it in the php, it will work fine
Not very secure at all! Imagine if I could find all the passwords to this site by going to forum.digitalpoint.com/passwords.txt . And all encryptions and hashes and be decrypted or brute forced...
You cannot and never decrypted if I set password like: a@bGj7%$hKh!%)&t (meaning password >15 characters long, include digists/alphabets/speacial characters. To decrypted it you must wait about 100000000000 years LOLz