Jump to content
Dragos

Wordpress - Cookie pentru accesarea paginii de logare

Recommended Posts

  • Moderators
Posted

Dupa vechiul articol cu codul de securitate, m-am gandit sa scriu unul nou despre cookie.

In ce consta acest cookie? Daca ai acest cookie activat, atunci poti accesa pagina de logare. Daca nu, scriptul va afisa un mesaj dat de tine.

Deschidem wp-login.php din directorul blogului si scriem urmatorul cod fix dupa <?php


if (!isset($_COOKIE["intra"])){
die ("mars de aici");
}else{
$cookie = $_COOKIE['intra'];
if (!($cookie == "cuchi")){
die ("mars de aici");
}
}

Pentru a putea vizualiza form-ul de logare, scrie in bara de adresa :

javascript:void(document.cookie="intra=cuchi");

dupa care dai refresh.

Simplu!

Join the conversation

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

Guest
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.



×
×
  • Create New...