Jump to content

Parola Pentru Accesarea Unei Pagini Web


Recommended Posts


Aveti o pagina in site-ul dumneavoastra pe care vreti sa o restrictionati, si vreti sa faceti asta fara .htaccess?

Atunci nu trebuie sa folositi decat urmatorul cod de mai jos:

if (
(!isset($_SERVER['PHP_AUTH_USER'])) || (!isset($_SERVER['PHP_AUTH_PW'])))
header ('WWW-Authenticate: Basic realm="php4"');
header ('HTTP/1.0 401 Unauthorized');
echo 'Pentru accesarea continutului este necesara o autentificare!';
echo "<html><head>";
echo "<title>Autentificare</title>";
echo "</head><body>";
echo "<p>Salut <b><i>{$_SERVER['PHP_AUTH_USER']}</i></b>!</p>";
echo "<p>Parola introdusa este <b><i>{$_SERVER['PHP_AUTH_PW']}</i></b>.</p>";
echo "</body></html>";


Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.