Page 1 of 1
Htaccess from PHP
Posted: Thu Jun 08, 2006 11:08 am
by john_van_v
Hello, I am looking for a way to utilize, and maintain, htaccess (and htpasswd)
Being a PHP noob, I am hoping to find a working php script which I can integrate into some simple file admin script.
Thanks in advance, John
PS the htaccess mod rewrite class came to mind, but being a noob...

Posted: Fri Jun 09, 2006 12:32 am
by RobertGonzalez
Are you talking abou a way to actually open, read/write to/remove from your .htaccess (& etc) files?
Posted: Fri Jun 09, 2006 9:14 am
by john_van_v
Yeah, a tool to manipulate the files.
Also, since there are users and crypts in the htpasswd file, then it makes sense to use that to do the PHP authentication. This way you won't need MySQL.
Posted: Fri Jun 09, 2006 10:14 am
by RobertGonzalez
I am more a proponent of databases for any type of data storage, but to do what you want you can simply use
the PHP filesystem series of functions.
Specifically you may want to look at the
fopen(),
fwrite() (or
fputs()),
fread() and
fclose() functions.
Posted: Sat Jun 10, 2006 10:07 am
by john_van_v
Hopefully, that work is done already, in classes. Question for me is finding them, or even better, finding a php script I can modify.
That is what I am asking.
Posted: Sat Jun 10, 2006 2:03 pm
by RobertGonzalez
You may want to try
Hotscripts. They have a decent selection of pre-built scripts to choose from.