Re: php htpasswd

From: Date: Tue, 18 Dec 2001 18:27:15 +0000
Subject: Re: php htpasswd
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-78118@lists.php.net to get a copy of this message
<? include_once('cookie.egn'); include_once('database.egn'); function bad_passwd() { echo "You have entered an invalid password.<br>\n"; exit(); } if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r = fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW' ") ) $SessionID = $peop_r['peopleID']; else { Header("WWW-Authenticate: Basic realm='$SERVER_NAME' "); Header("HTTP/1.0 401 Unauthorized"); bad_passwd(); } ?> http://www.mediawaveonline.com/examples/ -- Chris Lee lee@mediawaveonline.com "Jtjohnston" <jtjohnston@courrier.usherb.ca> wrote in message news:3C1F88E3.9DF8A7B7@courrier.usherb.ca... > Jack, > > > not sure i follow...you open it with php do whatever you need and close > > it...its just a text file... > > It's not just a text file delimited by a colon. You can indeed just type: > > user:password > > but it should be: > > user:crypt(password) > > When I perled, I knew how to database a text file delimited by : > Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my > htpasswd.users file. > I don't even know if I can? > > Can I anyone? How would I? >

« previous php.general (#78118) next »