hey guys,
as i'm about to create a small website with an "authorised area", i found a tutorial about a php-login system (no MySQL!) very useful. 🙂
(http://www.phptoys.com/e107_plugins/content/content.php?content.35)
it uses this code to detect, whether a user is on- or offline:
<?php
function checkUser(){
if ((!isset($_SESSION['validUser']))
|| ($_SESSION['validUser'] != true)){
header('Location: login.php');
}
}
?>
but how to protect, for example, a .pdf or .exe file (placed on the server) from anybody who is not logged in?
thank you,
greetings from austria,
julson