Re: Mail programme that uses .htpasswd to verify username/password
| From: | Richard Lynch | Date: | Wed, 24 Jul 2002 04:10:46 +0000 |
| Subject: | Re: Mail programme that uses .htpasswd to verify username/password | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109241@lists.php.net to get a copy of this message | ||
>Does anyone know of such a programme?
Untested code:
<?php
$lines = file('/full/path/to/.htpasswd') or die("Could not read .htpasswd
file");
while (list(,$line) = each($lines)){
$line = explode(':', $line);
$username = $line[0];
$password = $line[1];
$passwords[$username] = $password;
}
# Assuming HTTP Basic Authentication here...
if (!isset($passwords[$PHP_AUTH_USER])){
echo "Invalid Username<BR>\n";
}
elseif (crypt($PHP_AUTH_PW, $passwords[$HTTP_AUTH_USER]) !=
$HTTP_AUTH_PW){
echo "Invalid Password<BR>\n";
}
else{
# Continue script here.
}
?>
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.