PHP Sayfa şifreleme

SeLCuK's

Profesyonel
Katılım
27 Mar 2013
Mesajlar
118
Beğeniler
0
Yaş
27
Konum
Adana
#1
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();
}
}
?>
 

Bu konuyu okuyanlar (Üyeler: 1, Misafirler: 0)

Üst