Alright, the previous thingie I made had a problem that it asks for a password every single time, so I improved it a bit, made kind of a login-system, so it asks for a password only once an hour, after it was entered successfully.
PHP Code:
<?php
/* Zombe's password protection */
ob_start();
session_start();
if(!$_SESSION[$_SERVER[PHP_SELF]])
{ ?>
<!-- Zombe's password protection !-->
<form name = "form1" method = "POST">
Enter password:
<br>
<input type = "password" name = "pass">
<input type = "submit" value = "Accept">
</form>
<?php
if($_POST[pass])
{
if($_POST[pass] <> "yourpassword") die("<p>Incorrect password.");
}
else die();
$_SESSION[$_SERVER[PHP_SELF]] = true;
}
ob_end_flush();
?>