open wordpress only with access key

Open your template header.php file and add this to the top of the file

Then you can open your wordpress with url http://yourwordpress.com/?access=verysecretkey

<?php
if(!session_id()) {
session_start();
}
$access=“verysecretkey“;
if($_GET[‘access’]==$access){
$_SESSION[‘access’]=$_GET[‘access’];
}
elseif($_SESSION[‘access’]!=$access){
die(‘Im sorry you dont have permission to access this page, please login and try again.’);
}
?>

С етикет:
Публикувано в Без категория

Вашият коментар

Вашият имейл адрес няма да бъде публикуван.

*