--- Marian Briones <[EMAIL PROTECTED]> wrote: > I have done this in perl before, but I am writing a username and > password not only to a member database, but also to the .htacceess > file that will contain the usrename and passwords (Apache stuff). > > Can someone point me in the right direction to write te right code to > make that? crypt() I believe, but the rest of the syntax I am > clueless on. > > Thanks in advance, > Marian
For password protection you will have some statements in the .htaccess file which set the name of the realm, type of authentication (usually "basic"), and the location of the file in the filesystem with the usernames and encrypted passwords. When getting PHP to edit that file (not .htaccess but the file with the passwords) you can append a line with a username:encryptedpassword where the encryptedpassword comes from the md5() function in PHP. The Apache module, mod_auth will accept either crypt or md5 hashes. James _____ James D. Keeline http://www.Keeline.com http://www.Keeline.com/articles http://Stratemeyer.org http://www.Keeline.com/TSCollection http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. Summer Semester Begins Jun 20 -- New Classes Start Every Few Weeks. ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hov7i7g/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1124842677/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/