OK, I'm getting close to my goal.
I found a "quote of the day" script which uses cron to change a txt file based on words in another txt file.
I got it incorporated into password_protect.php...the only thing I don't know how to do is make it not look for the array when it goes to verify the password upon submit.
Instead of the $LOGIN_INFORMATION being an array, it's using the information in the flat txt file, therefore, I need to know how to change this part to reflect that:
$login = isset($_POST['access_login']) ? $_POST['access_login'] : '';
$pass = $_POST['access_password'];
if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION)
|| (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) )
) {
showLoginPasswordProtect("Incorrect password.");
}
Here's how I have the $LOGIN_INFORMATION set up:
$file = "todaysQuote.txt";
$fh = fopen($file, "r");
$string = fread($fh, filesize($file));
fclose($fh);
$LOGIN_INFORMATION = $file;
and the form:
<div style="width:500px; margin-left:auto; margin-right:auto; text-align:center">
Today's password is: <?php
// display quote of the day
$file = "todaysQuote.txt";
$fh = fopen($file, "r");
$string = fread($fh, filesize($file));
fclose($fh);
echo "<p><span style='color:red'><b>$string</b></span></p>";
?>
<form method="post">
<h3>To continue, <br>
please enter today's password <br>
and press submit:</h3>
<font color="red"><?php echo $error_msg; ?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'; ?>
<input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
</form>
<br />
<a style="font-size:9px; color: #B0B0B0; font-family: Verdana, Arial;" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Password Protector">Powered by Password Protect</a>
</div>