note 87470 added to features.http-auth
| From: | Anonymous at osu1 dot php dot net | Date: | Sat, 06 Dec 2008 13:12:07 +0000 |
| Subject: | note 87470 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-147747@lists.php.net to get a copy of this message | ||
ask for assistance, script it does not work why?
<?php
$selfSecure = 1;
$shellUser = "demo";
$shellPswd = "demo";
$adminEmail = "admin email hier eingeben";
$fromEmail = $HTTP_SERVER_VARS["SERVER_ADMIN"];
$Version = "Your details here (for example The Webmaster - webmaster@xxx.com)";
if($selfSecure){
if ($PHP_AUTH_PW!=$shellUser exit;} else echo"{$PHP_AUTH_USER!=$shellPswd}" {
Header('WWW-Authenticate: Basic realm="WWW-Authenticate"');
Header('HTTP/1.0 401 Unauthorized');
echo "<html>
<head>
<title>Error - Access Denied</title>
</head>
<h1>Access denied</h1>
A warning message has been sent to the webmaster. Your IP address has also been recorded
<hr>
<em>$Version</em>";
if(isset($PHP_AUTH_USER)){
$warnMsg ="
Somebody tried to access the script on: http://".$HTTP_SERVER_VARS["HTTP_HOST"]."$PHP_SELF
using the wrong username or password:
Date: ".date("Y-m-d H:i:s")."
IP: ".$HTTP_SERVER_VARS["REMOTE_ADDR"]."
User Agent: ".$HTTP_SERVER_VARS["HTTP_USER_AGENT"]."
username used: $PHP_AUTH_USER
password used: $PHP_AUTH_PW
";
mail($adminEmail,"Unauthorized Access",$warnMsg,
"From: $fromEmail\nX-Mailer:$Version AutoWarn System");
}
exit;
}
}
if(!$oCols)$oCols=$termCols;
if(!$oRows)$oRows=$termRows;
?>
----
Server IP: 212.124.37.9
Probable Submitter: 92.228.7.255
----
Manual Page -- http://www.php.net/manual/en/features.http-auth.php
Edit -- https://master.php.net/note/edit/87470
Del: integrated -- https://master.php.net/note/delete/87470/integrated
Del: useless -- https://master.php.net/note/delete/87470/useless
Del: bad code -- https://master.php.net/note/delete/87470/bad+code
Del: spam -- https://master.php.net/note/delete/87470/spam
Del: non-english -- https://master.php.net/note/delete/87470/non-english
Del: in docs -- https://master.php.net/note/delete/87470/in+docs
Del: other reasons-- https://master.php.net/note/delete/87470
Reject -- https://master.php.net/note/reject/87470
Search -- https://master.php.net/manage/user-notes.php