: What I usually do (and if you're working with structured websites) is to include a php script to the beginning of your index page which you want to deny its access from user/bot. This include
what I usually do (and if you're working with structured websites) is to include a php script to the beginning of your index page which you want to deny its access from user/bot.
This include verifies if the session 'auth' variable is set to 1. If not I redirect the user to the auth. page (it's just a form asking for a username and a password).
I create a .logs file that contains the username and the password (crypted thanks to the php method crypt('your password')).
The authentication script is verifying if the username and the password are successfully entered
if( crypt($_POST['password'], $password) === $password
&& $_POST['username'] === $username ){
$_SESSION['auth'] = 1;
header("Location: $_SERVER[HTTP_REFERER]");
}
More posts by @Pierce454
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.