Re: [PHP] login without database
On Fri, 30 Mar 2001, Jon Rosenberg wrote: you could use flat files, another words store the user information in a text file like below: username|pass|email bob|fgffsdg|[EMAIL PROTECTED] foo|bar|[EMAIL PROTECTED] and then just read and write the file with PHP. Jon Be sure to crypt the password you're saving in the file. Then you crypt the passwords coming in to the script with the same salt (se function crypt in the manual). Then compare the two and see if they differ from each other. Good luck -- Knut -- Knut H. Hassel Nielsen Principal Engineer / Avdelingsingenir Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
Does this work on Windows machines? WHat is the $PHP_AUTH_USER and where does it come from? What should my access.inc.php look like? I saw the PHP_AUTH_USER on the www.php.net website but looks like it is only possible on PHP module, not pHP CGI? Thanks in advance - "Romeo Manzur" [EMAIL PROTECTED] wrote: require('acces.inc.php'); if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) ( $PHP_AUTH_PW == "$st_PASSWORD" )) ) { header("WWW-Authenticate: Basic entrer=\"Admin Basta\""); header("HTTP/1.0 401 Unauthorized"); echo "Access in-autorizado..."; exit; } where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for authenticate you login, you have to put this code before the html tag... luck... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] login without database
Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
you could use flat files, another words store the user information in a text file like below: username|pass|email bob|fgffsdg|[EMAIL PROTECTED] foo|bar|[EMAIL PROTECTED] and then just read and write the file with PHP. Jon - Original Message - From: "Jan Grafstrm" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 11:15 AM Subject: [PHP] login without database Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
You can do this: require('acces.inc.php'); if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) ( $PHP_AUTH_PW == "$st_PASSWORD" )) ) { header("WWW-Authenticate: Basic entrer=\"Admin Basta\""); header("HTTP/1.0 401 Unauthorized"); echo "Access in-autorizado..."; exit; } where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for authenticate you login, you have to put this code before the html tag... luck... Jan Grafstrm wrote: Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- -- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904-A Desp 1, Centro C.P.:86000 Villahermosa, Tabasco, Mexico Tel.:(52)(9)3-12-4790 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
there is a header function that can set the document to no chache so that the browser will not cache it ""Jon Rosenberg"" [EMAIL PROTECTED] wrote in message 004301c0b934$d7ccb910$[EMAIL PROTECTED]">news:004301c0b934$d7ccb910$[EMAIL PROTECTED]... you could use flat files, another words store the user information in a text file like below: username|pass|email bob|fgffsdg|[EMAIL PROTECTED] foo|bar|[EMAIL PROTECTED] and then just read and write the file with PHP. Jon - Original Message - From: "Jan Grafström" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 11:15 AM Subject: [PHP] login without database Hi! Can I use php to make a login system for users? I don´t have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and it´s very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
Thank You Romeo! This may be something I can use. Regards Jan Romeo Manzur wrote: You can do this: require('acces.inc.php'); if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) ( $PHP_AUTH_PW == "$st_PASSWORD" )) ) { header("WWW-Authenticate: Basic entrer=\"Admin Basta\""); header("HTTP/1.0 401 Unauthorized"); echo "Access in-autorizado..."; exit; } where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for authenticate you login, you have to put this code before the html tag... luck... Jan Grafstrm wrote: Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- -- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904-A Desp 1, Centro C.P.:86000 Villahermosa, Tabasco, Mexico Tel.:(52)(9)3-12-4790 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
You would probably check against an encrypted file though for more security. you could use flat files, another words store the user information in a text file like below: username|pass|email bob|fgffsdg|[EMAIL PROTECTED] foo|bar|[EMAIL PROTECTED] and then just read and write the file with PHP. Jon - Original Message - From: "Jan Grafstrm" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 11:15 AM Subject: [PHP] login without database Hi! Can I use php to make a login system for users? I dont have a databas on my server. I only want to have a few users. When I send variables to php the string is always cached by IE5.5 and its very easy to se the username and password if you look i cache. Is there a way to get this done only on the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]