I'd like to generate a password for authentication with .htaccess with PHP dynamically. The PHP file contains the algorithm to generate the password and writes this password into a .htpasswd file. So: Is it possible to let the .htaccess file run this script when the directory is browsed before the authentication box is displayed (so the password is generated instantly before authentication)?
