שלום אני יביא לכם פה קוד ב html שבוא אתה מגדיר סיסמא
ורק עם יש לך תשם משתמש ואת הסיסמא אז אתה יכול
לצפות בתוכן האתר
PHP קוד:
<?
$infotext ="Registered "; // The text that's displayed in the logon window
$loginname ="פהתשנולשםמשתמש"; // The login name for the secured page
$password ="פהסיסמא"; // The password for the secured page
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $loginname) && ( $PHP_AUTH_PW == "$password" )) ) {
header("WWW-Authenticate: Basic entrer=$infotext");
header("HTTP/1.0 401 Unauthorized");
error("Access Denied");
}
?>else פה תוכן האתר
תהנו