PHP Sayfa şifreleme

0
Onaylı Üye
Üye
Katılım
27 Mart 2013
Mesajlar
118
Tepki puanı
0
Konum
Adana
PHP:
<?php
$bolge = "sifre ";
$kad = "selcuk";
$sifre = "selcuk";
if ($_SERVER["PHP_AUTH_USER"] == "")
{
  header ("WWW-Authenticate: Basic realm=\"$bolge\"");
  header("HTTP/1.0 401 Unauthorized");
echo "<html><head><title>Robot Security Guard </title></head><body bgcolor='white'><font color=red><br><br>";
echo "<center></center></body></html>";

   exit ();
}
else 
{
if ( ($_SERVER["PHP_AUTH_USER"] !=$kad) ||
($_SERVER["PHP_AUTH_PW"] != $sifre) )
{
header ("WWW-Authenticate: Basic realm=\"$bolge\"");
  header("HTTP/1.0 401 Unauthorized");
echo "Robot Security Guard Active !";
exit();
}
}
?>
 
Geri
Üst