Location: PHPKode > scripts > htaccess classes > htaccess-classes/examples_htaccess.php
// Here are some examples for the htaccess class
// (Groups are not implemented yet! Only Passwd and htaccess)


// Initializing class htaccess as $ht
$ht = new htaccess("/var/www/.htaccess","/var/www/htpasswd");

// Adding user

// Changing password for User

// Getting all usernames from set password file

foreach ($users as $key => $value) {
    echo $value[0]."<br>";

// Deleting user

// Setting authenification type
// If you don't set, the default type will be "Basic"

// Setting authenification area name
// If you don't set, the default name will be "Internal Area"
$ht->setAuthName("My private Area");

// finally you have to process addLogin()
// to write out the .htaccess file

// To delete a Login use the delLogin function

Return current item: htaccess classes